Skip to content

Commit dccbe07

Browse files
committed
test: preserve deterministic timer setup after rebase
1 parent 5c4e30c commit dccbe07

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/security/audit-sandbox-browser.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ describe("security audit sandbox browser findings", () => {
9393
});
9494

9595
it("bounds sandbox browser Docker probes that do not return", async () => {
96-
vi.useFakeTimers();
9796
let probeSignal: AbortSignal | undefined;
9897
let markProbeStarted!: () => void;
9998
const probeStarted = new Promise<void>((resolve) => {
10099
markProbeStarted = resolve;
101100
});
102101

102+
vi.useFakeTimers();
103103
const findingsPromise = collectSandboxBrowserHashLabelFindings({
104104
timeoutMs: 250,
105105
execDockerRawFn: async (_args, opts) => {
@@ -127,13 +127,13 @@ describe("security audit sandbox browser findings", () => {
127127
});
128128

129129
it("stops probing remaining sandbox browser containers after a Docker timeout", async () => {
130-
vi.useFakeTimers();
131130
const calls: string[] = [];
132131
let markHungProbeStarted!: () => void;
133132
const hungProbeStarted = new Promise<void>((resolve) => {
134133
markHungProbeStarted = resolve;
135134
});
136135

136+
vi.useFakeTimers();
137137
const findingsPromise = collectSandboxBrowserHashLabelFindings({
138138
timeoutMs: 250,
139139
execDockerRawFn: async (args, opts) => {

test/scripts/gh-read.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ describe("gh-read helpers", () => {
5959
});
6060

6161
it("aborts stalled GitHub API fetches at the request timeout", async () => {
62-
vi.useFakeTimers();
6362
let signal: AbortSignal | undefined;
6463
let markFetchStarted!: () => void;
6564
const fetchStarted = new Promise<void>((resolve) => {
6665
markFetchStarted = resolve;
6766
});
6867

68+
vi.useFakeTimers();
6969
const request = githubJson("/app", "token", undefined, {
7070
timeoutMs: 5,
7171
fetchImpl: ((_url, init) => {

0 commit comments

Comments
 (0)