mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
test: fix flaky fs-construct test
Fixes: https://github.com/nodejs/node/issues/33607 PR-URL: https://github.com/nodejs/node/pull/33625 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
2d071e767d
commit
b0b268f5a2
1 file changed
+10
-7
@@ -199,11 +199,14 @@ const examplePath = fixtures.path('x.txt');
|
||||
});
|
||||
});
|
||||
|
||||
const w = new WriteStream(`${tmpdir.path}/dummy2`,
|
||||
{ flags: 'wx+', emitClose: true })
|
||||
.on('error', common.mustCall((err) => {
|
||||
assert.strictEqual(err.code, 'EEXIST');
|
||||
w.destroy();
|
||||
w.on('close', common.mustCall());
|
||||
}));
|
||||
fs.open(`${tmpdir.path}/dummy3`, 'wx+', common.mustCall((err) => {
|
||||
assert(!err);
|
||||
const w = new WriteStream(`${tmpdir.path}/dummy3`,
|
||||
{ flags: 'wx+', emitClose: true })
|
||||
.on('error', common.mustCall((err) => {
|
||||
assert.strictEqual(err.code, 'EEXIST');
|
||||
w.destroy();
|
||||
w.on('close', common.mustCall());
|
||||
}));
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user