Skip to content

Commit

Permalink
put actual calls in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Apr 23, 2024
1 parent eb54918 commit 9c0d875
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/typegen/test/watch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ const waitForLog = async (match: RegExp, timeoutMs = 3000) => {
resolve()
} else if (Date.now() > end) {
reject(
new Error(`Logs matching /${match.source}/ not found after ${timeoutMs}ms`, {
cause: logger.info.mock.calls,
}),
new Error(
`Logs matching /${match.source}/ not found after ${timeoutMs}ms. Calls: ${JSON.stringify(logger.info.mock.calls, null, 2)}`,
{cause: logger.info.mock.calls},
),
)
} else {
setTimeout(check, 20)
Expand Down

0 comments on commit 9c0d875

Please sign in to comment.