handle_wrap: IsRefed() -> HasRef() · nodejs/node@f31a5ec

@@ -9,18 +9,18 @@ function makeAssert(message) {

99

strictEqual(actual, expected, message);

1010

};

1111

}

12-

const assert = makeAssert('isRefed() not working on tty_wrap');

12+

const assert = makeAssert('hasRef() not working on tty_wrap');

13131414

if (process.argv[2] === 'child') {

1515

// Test tty_wrap in piped child to guarentee stdin being a TTY.

1616

const ReadStream = require('tty').ReadStream;

1717

const tty = new ReadStream(0);

18-

assert(Object.getPrototypeOf(tty._handle).hasOwnProperty('isRefed'), true);

19-

assert(tty._handle.isRefed(), true);

18+

assert(Object.getPrototypeOf(tty._handle).hasOwnProperty('hasRef'), true);

19+

assert(tty._handle.hasRef(), true);

2020

tty.unref();

21-

assert(tty._handle.isRefed(), false);

21+

assert(tty._handle.hasRef(), false);

2222

tty._handle.close(

23-

common.mustCall(() => assert(tty._handle.isRefed(), false)));

23+

common.mustCall(() => assert(tty._handle.hasRef(), false)));

2424

return;

2525

}

2626