Skip to content

Commit 0750d07

Browse files
authored
Merge pull request #938 from preactjs/fix/test-suite-node-16
fix: As of Node 16, `fs.rmdir()` throws if path does not exist
2 parents d9cb0bc + 2b842d0 commit 0750d07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/wmr/test/production.test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ describe('production', () => {
471471
it('should serve the demo app', async () => {
472472
await loadFixture('../../../../examples/demo', env);
473473
for (const d of ['dist', 'node_modules', '.cache']) {
474-
await fs.rmdir(path.join(env.tmp.path, d), { recursive: true });
474+
try {
475+
await fs.rmdir(path.join(env.tmp.path, d), { recursive: true });
476+
} catch {}
475477
}
476478
instance = await runWmr(env.tmp.path, 'build', '--prerender');
477479
const code = await instance.done;

0 commit comments

Comments
 (0)