From 1b4ca3cf1f3da0f8ccb4044abcec0cf93e1b1621 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Fri, 6 Nov 2026 05:55:56 +0800 Subject: [PATCH] test(smoke): switch the failing test on in the saved configuration (#1631) Reruns launch the configuration as it is saved now (#1579), so Rerun Failed Tests dropped the switch the smoke test applied only to the first run and the failing test was skipped. The switched-on configuration is now put into the configuration list before the run. --- smoke/run.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/smoke/run.test.ts b/smoke/run.test.ts index 22dcce330..bda7b31f4 100644 --- a/smoke/run.test.ts +++ b/smoke/run.test.ts @@ -200,7 +200,10 @@ async function smoke(language: string) { } // Tests, with the intentionally failing one switched on: one failure, located, the rest passed. - const { id, output } = await runToEnd(c.tests.failing(config(c.tests.config))); + // Switched on in the saved configuration, as reruns launch the configuration as it is saved now. + const failing = c.tests.failing(config(c.tests.config)); + useRun.setState((s) => ({ configs: s.configs.map((x) => (x.id === failing.id ? failing : x)) })); + const { id, output } = await runToEnd(failing); const tests = runtime(id)!.tests!; const log = `\n--- output ---\n${output.slice(-80).join("\n")}`; expect(tests.counts(), log).toMatchObject({ passed: c.tests.passed, failed: 1 });