We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d071e7 commit b0b268fCopy full SHA for b0b268f
test/parallel/test-fs-stream-construct.js
@@ -199,11 +199,14 @@ const examplePath = fixtures.path('x.txt');
199
});
200
201
202
- const w = new WriteStream(`${tmpdir.path}/dummy2`,
203
- { flags: 'wx+', emitClose: true })
204
- .on('error', common.mustCall((err) => {
205
- assert.strictEqual(err.code, 'EEXIST');
206
- w.destroy();
207
- w.on('close', common.mustCall());
208
- }));
+ 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();
209
+ w.on('close', common.mustCall());
210
+ }));
211
212
}
0 commit comments