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
8 changes: 5 additions & 3 deletions test/test-runner/test-run-watch-cwd-isolation-none-argv.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// parent process argv when spawning the watch child.
import * as common from '../common/index.mjs';
import assert from 'node:assert';
import { readFileSync, writeFileSync } from 'node:fs';
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { run } from 'node:test';
import tmpdir from '../common/tmpdir.js';
Expand All @@ -11,8 +11,10 @@ import { skipIfNoWatch } from '../common/watch.js';
skipIfNoWatch();
tmpdir.refresh();

const watchedDir = join(tmpdir.path, 'watched');
const marker = join(tmpdir.path, 'marker');
writeFileSync(join(tmpdir.path, 'test.js'), `
mkdirSync(watchedDir);
writeFileSync(join(watchedDir, 'test.js'), `
const test = require('node:test');
const { writeFileSync } = require('node:fs');

Expand All @@ -23,7 +25,7 @@ test('test ran from cwd', () => {

const controller = new AbortController();
const stream = run({
cwd: tmpdir.path,
cwd: watchedDir,
watch: true,
signal: controller.signal,
isolation: 'none',
Expand Down
Loading