From b796a763ece25e1ac90d4ec03c6319fae975d91f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 17 Feb 2026 08:41:36 +0000 Subject: [PATCH] Expand perf toggle alias consistency coverage Co-authored-by: Julius Marminge --- apps/desktop/src/perfConfig.test.ts | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/apps/desktop/src/perfConfig.test.ts b/apps/desktop/src/perfConfig.test.ts index 5ea6c720e4..ab45974154 100644 --- a/apps/desktop/src/perfConfig.test.ts +++ b/apps/desktop/src/perfConfig.test.ts @@ -356,4 +356,52 @@ describe("toggle fallback consistency", () => { }), ).toBe(true); }); + + it("accepts the same explicit truthy aliases for all perf toggles", () => { + const truthyAliases = ["1", "true", "TRUE", " yes ", "ON"]; + for (const value of truthyAliases) { + expect( + shouldRunTerminalPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_TERMINAL: value, + CI: "true", + }), + ).toBe(true); + expect( + shouldRunOptionalRendererPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: value, + CI: "true", + }), + ).toBe(true); + expect( + shouldRunBenchmarkThreadSweep({ + T3CODE_DESKTOP_PERF_RUN_BENCHMARK_SWEEP: value, + CI: "true", + }), + ).toBe(true); + } + }); + + it("accepts the same explicit falsy aliases for all perf toggles", () => { + const falsyAliases = ["0", "false", "FALSE", " no ", "OFF"]; + for (const value of falsyAliases) { + expect( + shouldRunTerminalPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_TERMINAL: value, + CI: "false", + }), + ).toBe(false); + expect( + shouldRunOptionalRendererPerfInteractions({ + T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: value, + CI: "false", + }), + ).toBe(false); + expect( + shouldRunBenchmarkThreadSweep({ + T3CODE_DESKTOP_PERF_RUN_BENCHMARK_SWEEP: value, + CI: "false", + }), + ).toBe(false); + } + }); });