We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f269049 commit 1fce8fdCopy full SHA for 1fce8fd
test/fixtures/mocha-hooks.js
@@ -7,8 +7,15 @@ const paths = require("../utils/paths");
7
* Re-create the .tmp directories before each test
8
*/
9
beforeEach("clean the .tmp directory", async () => {
10
- // Delete the .tmp directory, if it exists
11
- await fs.rmdir(paths.tmp, { recursive: true });
+ try {
+ // 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
19
20
// Create the home and workspace directories
21
await fs.mkdir(paths.home, { recursive: true });
0 commit comments