Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 0a7a9ab

Browse files
committed
test: modify console-assign-undefined to not rely on error messages
1 parent a90dd55 commit 0a7a9ab

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/parallel/test-console-assign-undefined.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ const assert = require('assert');
1414
assert.strictEqual(global.console, 42);
1515
assert.strictEqual(global.console, 42);
1616

17-
common.expectsError(
18-
() => console.log('foo'),
19-
{
20-
type: TypeError,
21-
message: 'console.log is not a function'
22-
}
23-
);
17+
assert.throws(() => console.log('foo'), TypeError);
2418

2519
global.console = 1;
2620
assert.strictEqual(global.console, 1);

0 commit comments

Comments
 (0)