Skip to content

Commit 596477b

Browse files
Handle no directory
Signed-off-by: Peter Broadhurst <[email protected]>
1 parent ba9c4cc commit 596477b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/app.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ import * as app from '../src/app';
1717
describe('app', () => {
1818

1919
beforeEach(async () => {
20-
if ((await fs.stat(sandboxDir)).isDirectory()) {
21-
await fs.rm(sandboxDir, { recursive: true, force: true})
22-
}
20+
try {
21+
if ((await fs.stat(sandboxDir)).isDirectory()) {
22+
await fs.rm(sandboxDir, { recursive: true, force: true})
23+
}
24+
} catch(err: any) {}
2325
await fs.mkdir(sandboxDir)
2426
await fs.mkdir(join(sandboxDir, 'peer-certs'))
2527

0 commit comments

Comments
 (0)