Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/vscode-ide-companion/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export default defineConfig({
},
},
test: {
// See packages/core/vitest.config.ts: the embedded-webview bundle guard
// drives esbuild across the whole webview app, which outruns vitest's 5s
// default under shared-runner contention (and on slow hosts even without
// it). Only the timeout ceiling grows; assertions still fail instantly.
testTimeout: process.env['RUNNER_NAME']?.startsWith('ecs-qwen-')
? 60_000
: 15_000,
globals: true,
environment: 'node',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'scripts/**/*.test.js'],
Expand Down
21 changes: 21 additions & 0 deletions scripts/tests/unit-vitest-configs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,24 @@ describe('autofix gate load clamps', () => {
}
});
});

describe('bundle-guard timeout ceiling', () => {
it('keeps the bundle-guard timeout ceiling in packages/vscode-ide-companion', async () => {
// The config reads RUNNER_NAME at import time, so re-import it under
// each stub to pin both branches, not only the ambient one.
for (const [runnerName, expected] of [
['ecs-qwen-parity', 60_000],
['ubuntu-latest-runner', 15_000],
] as const) {
vi.stubEnv('RUNNER_NAME', runnerName);
vi.resetModules();
const mod = await import(
'../../packages/vscode-ide-companion/vitest.config.js'
);
expect(mod.default.test?.testTimeout, `RUNNER_NAME=${runnerName}`).toBe(
expected,
);
vi.unstubAllEnvs();
}
});
});
Loading