Skip to content

Commit

Permalink
[squash] add streams-only test
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Feb 20, 2018
1 parent 845bf1d commit 356ac44
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-stream-writable-destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,17 @@ const { inherits } = require('util');
assert.strictEqual(expected, err);
}));
}

{
// Checks that `._undestroy()` restores the state so that `final` will be
// called again.
const write = new Writable({
write: common.mustNotCall(),
final: common.mustCall((cb) => cb(), 2)
});

write.end();
write.destroy();
write._undestroy();
write.end();
}

0 comments on commit 356ac44

Please sign in to comment.