Skip to content

Commit

Permalink
test: do not write to fixtures dir in test-watch-file
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and addaleax committed Sep 22, 2020
1 parent 95b2a39 commit 2137024
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/pummel/test-watch-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
require('../common');
const assert = require('assert');
const fs = require('fs');
const fixtures = require('../common/fixtures');
const path = require('path');
const tmpdir = require('../common/tmpdir');

const f = fixtures.path('x.txt');
tmpdir.refresh();
const f = path.join(tmpdir.path, 'x.txt');
fs.closeSync(fs.openSync(f, 'w'));

let changes = 0;
function watchFile() {
Expand Down

0 comments on commit 2137024

Please sign in to comment.