Skip to content

Commit

Permalink
chore: use node for testEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jun 14, 2020
1 parent 2034993 commit b384dec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"js",
"jsx"
],
"testEnvironment": "node",
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
Expand Down
6 changes: 4 additions & 2 deletions src/__tests__/volume.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,10 @@ describe('volume', () => {
vol.writeFileSync('/lol.txt', '1');
setTimeout(() => {
vol.watchFile('/lol.txt', { interval: 1 }, (curr, prev) => {
vol.unwatchFile('/lol.txt');
done();
process.nextTick(() => {
vol.unwatchFile('/lol.txt');
done();
});
});
vol.writeFileSync('/lol.txt', '2');
}, 1);
Expand Down

0 comments on commit b384dec

Please sign in to comment.