Skip to content

Commit e240acf

Browse files
bb-connorclaude
andcommitted
fix: mock hardwareConcurrency in observatory performance tests for CI consistency
CI runners have 2 cores, triggering lowQuality=true (hardwareConcurrency<=4). This changes DPR from [1,1.2] to [1,1.1] and disables VFX pools. Mock to 8 cores for consistent test behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4f481f3 commit e240acf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/workbench/src/features/observatory/__tests__/observatory-world-canvas.performance.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ const baseProps = {
308308
describe("ObservatoryWorldCanvas performance flags", () => {
309309
beforeEach(() => {
310310
vi.spyOn(console, "error").mockImplementation(() => {});
311+
// Ensure consistent hardware profile across local (high-core) and CI (low-core) environments
312+
Object.defineProperty(navigator, "hardwareConcurrency", { configurable: true, value: 8 });
311313
fiberMock.canvasProps.length = 0;
312314
fiberMock.regress.mockReset();
313315
dreiMock.performanceMonitorProps.length = 0;

0 commit comments

Comments
 (0)