test: use tmpDir in test-fs-utimes · nodejs/node@c1309d6 · GitHub
Skip to content

Commit c1309d6

Browse files
TrottMylesBorins
authored andcommitted
test: use tmpDir in test-fs-utimes
test-fs-utimes was doing some tests against __filename. This made the test unreliable when multiple copies were run simultaneously. In general, tests should use files in either the tmp directory or else fixtures, so change to using `common.tmpDir` instead. Each copy of the test (if using `test.py` harness for parallel runs) will use its own directory, making the test robust again. PR-URL: #16774 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
1 parent 360f403 commit c1309d6

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

test/parallel/test-fs-utimes.js

Lines changed: 9 additions & 11 deletions

0 commit comments

Comments
 (0)