History

Expand benchmark pass parser boundary tests

Cursor Agent committed 9 months ago

Commit a787ec41 parent 7aff63f1 file · +13 −0Browse files

Unified · Split

apps/desktop/src/perfConfig.test.ts+13−0
@@ -145,6 +145,7 @@ describe("resolveBenchmarkFollowUpPassCount", () => { · 144 unmodified lines
145 it("defaults to 0 in CI", () => {145 it("defaults to 0 in CI", () => {
146 expect(resolveBenchmarkFollowUpPassCount({ CI: "true" })).toBe(0);146 expect(resolveBenchmarkFollowUpPassCount({ CI: "true" })).toBe(0);
147 expect(resolveBenchmarkFollowUpPassCount({ CI: "on" })).toBe(0);147 expect(resolveBenchmarkFollowUpPassCount({ CI: "on" })).toBe(0);
148 expect(resolveBenchmarkFollowUpPassCount({ CI: " yes " })).toBe(0);
148 });149 });
149 150
150 it("accepts explicit non-negative integer overrides", () => {151 it("accepts explicit non-negative integer overrides", () => {
@@ -163,6 +164,18 @@ describe("resolveBenchmarkFollowUpPassCount", () => { · 12 unmodified lines
163 });164 });
164 165
165 it("caps explicit overrides to avoid runaway workload", () => {166 it("caps explicit overrides to avoid runaway workload", () => {
167 expect(
168 resolveBenchmarkFollowUpPassCount({
169 T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES: "5",
170 CI: "false",
171 }),
172 ).toBe(5);
173 expect(
174 resolveBenchmarkFollowUpPassCount({
175 T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES: "6",
176 CI: "false",
177 }),
178 ).toBe(5);
166 expect(179 expect(
167 resolveBenchmarkFollowUpPassCount({180 resolveBenchmarkFollowUpPassCount({
168 T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES: "99",181 T3CODE_DESKTOP_PERF_BENCHMARK_FOLLOW_UP_PASSES: "99",

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