From 93cdf31e466caec6060f72e263d577f82395277d Mon Sep 17 00:00:00 2001 From: you Date: Sun, 29 Mar 2026 17:44:07 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20fail-fast=20in=20Playwright=20test=20run?= =?UTF-8?q?ner=20=E2=80=94=20exit=20immediately=20on=20first=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- test-e2e-playwright.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-e2e-playwright.js b/test-e2e-playwright.js index dc5529eb..c53c4d3d 100644 --- a/test-e2e-playwright.js +++ b/test-e2e-playwright.js @@ -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); } }