aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-stream-pipe-cleanup.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-stream-pipe-cleanup.js')
-rw-r--r--test/parallel/test-stream-pipe-cleanup.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/parallel/test-stream-pipe-cleanup.js b/test/parallel/test-stream-pipe-cleanup.js
index ac0a72a1da..cdb4d503d6 100644
--- a/test/parallel/test-stream-pipe-cleanup.js
+++ b/test/parallel/test-stream-pipe-cleanup.js
@@ -25,14 +25,14 @@
require('../common');
const stream = require('stream');
const assert = require('assert');
-const util = require('util');
function Writable() {
this.writable = true;
this.endCalls = 0;
stream.Stream.call(this);
}
-util.inherits(Writable, stream.Stream);
+Object.setPrototypeOf(Writable.prototype, stream.Stream.prototype);
+Object.setPrototypeOf(Writable, stream.Stream);
Writable.prototype.end = function() {
this.endCalls++;
};
@@ -45,13 +45,15 @@ function Readable() {
this.readable = true;
stream.Stream.call(this);
}
-util.inherits(Readable, stream.Stream);
+Object.setPrototypeOf(Readable.prototype, stream.Stream.prototype);
+Object.setPrototypeOf(Readable, stream.Stream);
function Duplex() {
this.readable = true;
Writable.call(this);
}
-util.inherits(Duplex, Writable);
+Object.setPrototypeOf(Duplex.prototype, Writable.prototype);
+Object.setPrototypeOf(Duplex, Writable);
let i = 0;
const limit = 100;