mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-14 10:29:49 +00:00
fix: fail-fast in Playwright test runner — exit immediately on first failure
The test() helper was catching errors and collecting them into results[], only checking for failures after all tests completed. This meant the runner kept going through remaining tests even after a failure, wasting CI time and obscuring the root cause. Now process.exit(1) is called immediately when a test fails, giving true fail-fast behavior.
This commit is contained in:
@@ -17,6 +17,8 @@ async function test(name, fn) {
|
||||
} catch (err) {
|
||||
results.push({ name, pass: false, error: err.message });
|
||||
console.log(` \u274c ${name}: ${err.message}`);
|
||||
console.log(`\nFail-fast: stopping after first failure.`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user