mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
415726b8c4
PR-URL: https://github.com/nodejs/node/pull/40802 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
27 lines
521 B
JavaScript
27 lines
521 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { Writable } = require('stream');
|
|
|
|
{
|
|
const writable = new Writable({
|
|
write() {
|
|
}
|
|
});
|
|
assert.strictEqual(writable.writableAborted, false);
|
|
writable.destroy();
|
|
assert.strictEqual(writable.writableAborted, true);
|
|
}
|
|
|
|
{
|
|
const writable = new Writable({
|
|
write() {
|
|
}
|
|
});
|
|
assert.strictEqual(writable.writableAborted, false);
|
|
writable.end();
|
|
writable.destroy();
|
|
assert.strictEqual(writable.writableAborted, true);
|
|
}
|