From 2f981cdd5824845aeaf0abb0412b64bb31f49225 Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Fri, 28 Dec 2018 12:10:45 +0800 Subject: test: remove `util.inherits()` usage PR-URL: https://github.com/nodejs/node/pull/25245 Refs: https://github.com/nodejs/node/pull/24755 Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen --- test/fixtures/repl-tab-completion-nested-repls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/fixtures') diff --git a/test/fixtures/repl-tab-completion-nested-repls.js b/test/fixtures/repl-tab-completion-nested-repls.js index 832734a22a..ceff6e7945 100644 --- a/test/fixtures/repl-tab-completion-nested-repls.js +++ b/test/fixtures/repl-tab-completion-nested-repls.js @@ -7,7 +7,6 @@ 'use strict'; const { Stream } = require('stream'); -const { inherits } = require('util'); function noop() {} // A stream to push an array into a REPL @@ -19,7 +18,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; @@ -47,4 +47,4 @@ putIn.run([ ]); // In Node.js 10.11.0, this next line will terminate the repl silently... -testMe.complete('inner.o', () => { throw new Error('fhqwhgads'); }); +testMe.complete('inner.o', () => { throw new Error('fhqwhgads'); }); \ No newline at end of file -- cgit v1.2.3