History

Add consistency tests for perf toggle CI fallback

Cursor Agent committed 9 months ago

Commit 65b91441 parent 50697341 file · +44 −0Browse files

Unified · Split

apps/desktop/src/perfConfig.test.ts+44−0
@@ -293,3 +293,47 @@ describe("shouldRunBenchmarkThreadSweep", () => { · 292 unmodified lines
293 ).toBe(true);293 ).toBe(true);
294 });294 });
295});295});
296
297describe("toggle fallback consistency", () => {
298 it("applies the same CI-aware fallback to all perf toggles", () => {
299 const unknownValue = { value: "maybe" };
300
301 expect(
302 shouldRunTerminalPerfInteractions({
303 T3CODE_DESKTOP_PERF_RUN_TERMINAL: unknownValue.value,
304 CI: "true",
305 }),
306 ).toBe(false);
307 expect(
308 shouldRunOptionalRendererPerfInteractions({
309 T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: unknownValue.value,
310 CI: "true",
311 }),
312 ).toBe(false);
313 expect(
314 shouldRunBenchmarkThreadSweep({
315 T3CODE_DESKTOP_PERF_RUN_BENCHMARK_SWEEP: unknownValue.value,
316 CI: "true",
317 }),
318 ).toBe(false);
319
320 expect(
321 shouldRunTerminalPerfInteractions({
322 T3CODE_DESKTOP_PERF_RUN_TERMINAL: unknownValue.value,
323 CI: "false",
324 }),
325 ).toBe(true);
326 expect(
327 shouldRunOptionalRendererPerfInteractions({
328 T3CODE_DESKTOP_PERF_RUN_OPTIONAL_RENDERER: unknownValue.value,
329 CI: "false",
330 }),
331 ).toBe(true);
332 expect(
333 shouldRunBenchmarkThreadSweep({
334 T3CODE_DESKTOP_PERF_RUN_BENCHMARK_SWEEP: unknownValue.value,
335 CI: "false",
336 }),
337 ).toBe(true);
338 });
339});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t