Skip to content

Commit 1369064

Browse files
authored
fix: bail configuration should work with the test file error (#997)
1 parent 873f92d commit 1369064

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/core/src/core/stateManager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ export class TestStateManager {
6363
getCountOfFailedTests(): number {
6464
const testResults: TestResult[] = Array.from(this.runningModules.values())
6565
.flatMap(({ results }) => results)
66-
.concat(this.testModules.flatMap((mod) => mod.results));
66+
.concat(
67+
this.testModules.flatMap((mod) =>
68+
mod.results.length > 0
69+
? mod.results
70+
: [{ status: mod.status } as TestResult],
71+
),
72+
);
6773

6874
return testResults.filter((t) => t.status === 'fail').length;
6975
}

0 commit comments

Comments
 (0)