Skip to content

Commit 9e6d04e

Browse files
committed
Workaround file reuse issue on Windows for #109.
If you try to recreate a file too quickly after deleting it on Windows it will give you EPERM. This is why things like graceful-fs exist. Working around this in the tests by just not using the same name in both file-test.js and file-sync-test.js.
1 parent a11a18b commit 9e6d04e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/file-sync-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ vows.describe('Synchronous file creation').addBatch({
7979

8080
'when using name': {
8181
topic: function () {
82-
return tmp.fileSync({ name: 'using-name.tmp' });
82+
return tmp.fileSync({ name: 'using-name-sync.tmp' });
8383
},
8484

8585
'should return with a name': Test.assertNameSync,
86-
'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name.tmp')),
86+
'should have the provided name': Test.testNameSync(path.join(tmp.tmpdir, 'using-name-sync.tmp')),
8787
'should be a file': function (result) {
8888
_testFile(0100600, true);
8989
fs.unlinkSync(result.name);

0 commit comments

Comments
 (0)