From 77542a4a7a1b926e484e6c2b939e2cb1bfb4c2e4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 14 Jul 2020 21:04:13 -0700 Subject: [PATCH] test: do not write to fixtures dir in test-watch-file Switch to tmpDir rather than fixtures for file writing. PR-URL: https://github.com/nodejs/node/pull/34376 Reviewed-By: Richard Lau Reviewed-By: James M Snell --- test/pummel/test-watch-file.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-watch-file.js b/test/pummel/test-watch-file.js index 4a7282052065d6..9bac9004835c59 100644 --- a/test/pummel/test-watch-file.js +++ b/test/pummel/test-watch-file.js @@ -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() {