test: assert console.error in async-rejection stage test

This commit is contained in:
yelog 2026-04-01 13:14:26 +08:00 committed by Peter Steinberger
parent 0a636aef24
commit ffa1e5fa92
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ describe("runGatewayHttpRequestStages", () => {
expect(result).toBe(true);
expect(stageC).toHaveBeenCalled();
expect(consoleSpy).toHaveBeenCalledWith(
expect.stringContaining('stage "async-broken" threw'),
expect.any(Error),
);
consoleSpy.mockRestore();
});