diff options
Diffstat (limited to 'packages/bun-test/src/runner.ts')
-rw-r--r-- | packages/bun-test/src/runner.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/bun-test/src/runner.ts b/packages/bun-test/src/runner.ts index 099af3afd..938304612 100644 --- a/packages/bun-test/src/runner.ts +++ b/packages/bun-test/src/runner.ts @@ -64,9 +64,12 @@ async function runTest(path: string): Promise<void> { } } +let failed = false; + function findErrors(data: Uint8Array): void { const text = new TextDecoder().decode(data); for (const [message, _, path, line, col] of text.matchAll(errorPattern)) { + failed = true; action.error(message, { file: path.replace(cwd, "").slice(1), startLine: parseInt(line), @@ -80,3 +83,7 @@ for (const path of findTests(resolve(cwd, "test/bun.js"))) { tests.push(runTest(path).catch(console.error)); } await Promise.allSettled(tests); + +if (isAction) { + action.setFailed("Found errors"); +} |