Skip to content

Commit 77542a4

Browse files
TrottMylesBorins
authored andcommitted
test: do not write to fixtures dir in test-watch-file
Switch to tmpDir rather than fixtures for file writing. PR-URL: #34376 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 699da05 commit 77542a4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/pummel/test-watch-file.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@
2424
require('../common');
2525
const assert = require('assert');
2626
const fs = require('fs');
27-
const fixtures = require('../common/fixtures');
27+
const path = require('path');
28+
const tmpdir = require('../common/tmpdir');
2829

29-
const f = fixtures.path('x.txt');
30+
tmpdir.refresh();
31+
const f = path.join(tmpdir.path, 'x.txt');
32+
fs.closeSync(fs.openSync(f, 'w'));
3033

3134
let changes = 0;
3235
function watchFile() {

0 commit comments

Comments
 (0)