Unified · Split
| @@ -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", |