We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65dfeeb commit 837ca76Copy full SHA for 837ca76
test/pummel/test-fs-watch-non-recursive.js
@@ -25,19 +25,13 @@ const path = require('path');
25
const fs = require('fs');
26
27
const tmpdir = require('../common/tmpdir');
28
+tmpdir.refresh();
29
30
const testDir = tmpdir.path;
31
const testsubdir = path.join(testDir, 'testsubdir');
32
const filepath = path.join(testsubdir, 'watch.txt');
33
-function cleanup() {
34
- try { fs.unlinkSync(filepath); } catch { }
35
- try { fs.rmdirSync(testsubdir); } catch { }
36
-}
37
-process.on('exit', cleanup);
38
-cleanup();
39
-
40
-try { fs.mkdirSync(testsubdir, 0o700); } catch {}
+fs.mkdirSync(testsubdir, 0o700);
41
42
// Need a grace period, else the mkdirSync() above fires off an event.
43
setTimeout(function() {
0 commit comments