Skip to content

Commit 356ac44

Browse files
committed
[squash] add streams-only test
1 parent 845bf1d commit 356ac44

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/parallel/test-stream-writable-destroy.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,17 @@ const { inherits } = require('util');
185185
assert.strictEqual(expected, err);
186186
}));
187187
}
188+
189+
{
190+
// Checks that `._undestroy()` restores the state so that `final` will be
191+
// called again.
192+
const write = new Writable({
193+
write: common.mustNotCall(),
194+
final: common.mustCall((cb) => cb(), 2)
195+
});
196+
197+
write.end();
198+
write.destroy();
199+
write._undestroy();
200+
write.end();
201+
}

0 commit comments

Comments
 (0)