Skip to content

Commit d98d539

Browse files
Removed test logic to handle ENOENT error that only occurs on Node 10
1 parent 6784338 commit d98d539

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/fixtures/mocha-hooks.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ const paths = require("../utils/paths");
77
* Re-create the .tmp directories before each test
88
*/
99
beforeEach("clean the .tmp directory", async () => {
10-
try {
11-
// Delete the .tmp directory, if it exists
12-
await fs.rmdir(paths.tmp, { recursive: true });
13-
}
14-
catch (error) {
15-
if (error.code !== "ENOENT") {
16-
throw error;
17-
}
18-
}
10+
// Delete the .tmp directory, if it exists
11+
await fs.rmdir(paths.tmp, { recursive: true });
1912

2013
// Create the home and workspace directories
2114
await fs.mkdir(paths.home, { recursive: true });

0 commit comments

Comments
 (0)