diff options
author | 2023-02-03 11:32:01 -0800 | |
---|---|---|
committer | 2023-02-03 11:32:01 -0800 | |
commit | 92255d56c896588d797d9147fc963182b5d7b214 (patch) | |
tree | 968612250e1f9c14aec830fca0e2319cc156c8ca | |
parent | ba076b0a2b219483530b41ef24cd4f4369f658d6 (diff) | |
download | bun-92255d56c896588d797d9147fc963182b5d7b214.tar.gz bun-92255d56c896588d797d9147fc963182b5d7b214.tar.zst bun-92255d56c896588d797d9147fc963182b5d7b214.zip |
Attempt to debug annotations
-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"); +} |