Skip to content

Commit 520693d

Browse files
committed
chore: fix lint
Signed-off-by: Vlad Frangu <me@vladfrangu.dev>
1 parent 8481ecf commit 520693d

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

lib/internal/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
Error,
99
ErrorCaptureStackTrace,
1010
FunctionPrototypeCall,
11+
FunctionPrototypeSymbolHasInstance,
1112
NumberParseInt,
1213
ObjectDefineProperties,
1314
ObjectDefineProperty,

src/node_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static void GuessHandleType(const FunctionCallbackInfo<Value>& args) {
230230

231231
// If the provided file descriptor is not valid, we return null
232232
if (fd < 0) [[unlikely]] {
233-
args.GetReturnValue().Set(v8::Null(env->isolate()));
233+
args.GetReturnValue().Set(v8::Null(isolate));
234234
return;
235235
}
236236

test/pseudo-tty/test-os-guessFileDescriptorType.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22

33
require('../common');
4-
const { strictEqual, throws } = require('assert');
4+
const assert = require('node:assert');
55
const { guessFileDescriptorType } = require('os');
66

7-
strictEqual(guessFileDescriptorType(0), 'TTY', 'stdin reported to not be a tty, but it is');
8-
strictEqual(guessFileDescriptorType(1), 'TTY', 'stdout reported to not be a tty, but it is');
9-
strictEqual(guessFileDescriptorType(2), 'TTY', 'stderr reported to not be a tty, but it is');
7+
assert.strictEqual(guessFileDescriptorType(0), 'TTY');
8+
assert.strictEqual(guessFileDescriptorType(1), 'TTY');
9+
assert.strictEqual(guessFileDescriptorType(2), 'TTY');
1010

11-
strictEqual(guessFileDescriptorType(55555), 'UNKNOWN', '55555 reported to be a handle, but it is not');
12-
strictEqual(guessFileDescriptorType(2 ** 31 - 1), 'UNKNOWN', '2^31-1 reported to be a handle, but it is not');
11+
assert.strictEqual(guessFileDescriptorType(55555), 'UNKNOWN');
12+
assert.strictEqual(guessFileDescriptorType(2 ** 31 - 1), 'UNKNOWN');
1313

1414
[
1515
-1,
@@ -25,4 +25,4 @@ strictEqual(guessFileDescriptorType(2 ** 31 - 1), 'UNKNOWN', '2^31-1 reported to
2525
Symbol(),
2626
undefined,
2727
null,
28-
].forEach((val) => throws(() => guessFileDescriptorType(val), { code: 'ERR_INVALID_FD' }));
28+
].forEach((val) => assert.throws(() => guessFileDescriptorType(val), { code: 'ERR_INVALID_FD' }));

0 commit comments

Comments
 (0)