fix(test): use string containment check for ANSI-wrapped console.log output
The waitForEventProcessorShutdown test was comparing exact string match against console.log spy, but picocolors wraps the message in ANSI dim codes. On CI (bun 1.3.9) this caused the assertion to fail. Use string containment check instead of exact argument match.
This commit is contained in:
@@ -117,7 +117,8 @@ describe("waitForEventProcessorShutdown", () => {
|
||||
//#then
|
||||
const elapsed = performance.now() - start
|
||||
expect(elapsed).toBeGreaterThanOrEqual(timeoutMs)
|
||||
expect(spy).toHaveBeenCalledWith(
|
||||
const callArgs = spy.mock.calls.flat().join("")
|
||||
expect(callArgs).toContain(
|
||||
`[run] Event stream did not close within ${timeoutMs}ms after abort; continuing shutdown.`,
|
||||
)
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user