Skip to content

Commit 0e1fd02

Browse files
committed
fix(ios-snapshot): route preparation test scratch through mkdtempForTest
Rebasing onto main picked up the ban on node:os in tests (#2629's mkdtempForTest routing), and this test's own scratch dir predates that change. Route it through the same helper so the branch's own new test stays lint-clean; behavior is unchanged, only where the temp directory comes from.
1 parent 79f2d9f commit 0e1fd02

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/platform-apple/src/snapshot-source/preparation.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import assert from 'node:assert/strict';
2-
import { mkdtemp, rm, writeFile } from 'node:fs/promises';
3-
import os from 'node:os';
2+
import { rm, writeFile } from 'node:fs/promises';
43
import path from 'node:path';
54
import { test } from 'vitest';
5+
import { mkdtempForTest } from '../__tests__/tmp-dir.ts';
66
import { createSnapshotSourceDeadline, type SnapshotSourceDeadline } from './deadline.ts';
77
import { createSnapshotSourceHost } from './host.ts';
88
import { resolveSnapshotSourceLimits } from './limits.ts';
@@ -193,7 +193,7 @@ test('closing the preparation stops a build that is still running', async () =>
193193
});
194194

195195
async function writeBridgeSource(prefix: string): Promise<string> {
196-
const root = await mkdtemp(path.join(os.tmpdir(), `agent-device-bridge-${prefix}`));
196+
const root = await mkdtempForTest(`agent-device-bridge-${prefix}`);
197197
const sourceRoot = path.join(root, 'source');
198198
await (await import('@agent-device/host-kit/host-file')).ensureHostDirectory(sourceRoot);
199199
for (const name of BRIDGE_SOURCES) {

0 commit comments

Comments
 (0)