mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: remove util.inherits() usage
Backport-PR-URL: https://github.com/nodejs/node/pull/28795 PR-URL: https://github.com/nodejs/node/pull/25245 Refs: https://github.com/nodejs/node/pull/24755 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
4a607fab49
commit
f332265cda
12 files changed
+35
-28
No files matched your search
@@ -2,7 +2,6 @@
|
||||
'use strict';
|
||||
|
||||
const { Stream } = require('stream');
|
||||
const { inherits } = require('util');
|
||||
function noop() {}
|
||||
|
||||
// A stream to push an array into a REPL
|
||||
@@ -14,7 +13,8 @@ function ArrayStream() {
|
||||
};
|
||||
}
|
||||
|
||||
inherits(ArrayStream, Stream);
|
||||
Object.setPrototypeOf(ArrayStream.prototype, Stream.prototype);
|
||||
Object.setPrototypeOf(ArrayStream, Stream);
|
||||
ArrayStream.prototype.readable = true;
|
||||
ArrayStream.prototype.writable = true;
|
||||
ArrayStream.prototype.pause = noop;
|
||||
|
||||
Reference in new issue
Block a user