Skip to content
Open
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
6 changes: 5 additions & 1 deletion tests/telemetry.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { execFile } from 'node:child_process';
import { readFile } from 'node:fs/promises';
import { promisify } from 'node:util';
import { expect, it } from 'vitest';
import { expect, it, vi } from 'vitest';

const run = promisify(execFile);
const platformUrl = new URL('../src/server/platform.ts', import.meta.url).href;
Expand All @@ -10,6 +10,10 @@ const workspaceUrl = new URL('../src/server/workspace.ts', import.meta.url)
.href;
const tsxUrl = import.meta.resolve('tsx');

// Every probe boots a fresh tsx process, and captureRuntime already lets that
// process run for 15 s, which outlasts Vitest's 5 s default test timeout.
vi.setConfig({ testTimeout: 20000 });

// Intercept the real SDK transport before import, in a fresh process so its
// singleton observes each environment. These probes never send live telemetry.
const probe = `
Expand Down