test: remove common.expectsInternalAssertion · nodejs/node@89987b3 · GitHub
Skip to content

Commit 89987b3

Browse files
TrottMylesBorins
authored andcommitted
test: remove common.expectsInternalAssertion
Remove convenience function for internal assertions. It is only used once. Signed-off-by: Rich Trott <rtrott@gmail.com> PR-URL: #32057 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 31e4a0d commit 89987b3

3 files changed

Lines changed: 13 additions & 20 deletions

File tree

test/common/index.js

Lines changed: 0 additions & 14 deletions

test/parallel/test-internal-errors.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Flags: --expose-internals
22
'use strict';
3-
const common = require('../common');
3+
require('../common');
44
const {
55
hijackStdout,
66
restoreStdout,
@@ -50,10 +50,13 @@ errors.E('TEST_ERROR_2', (a, b) => `${a} ${b}`, Error);
5050
}
5151

5252
{
53-
common.expectsInternalAssertion(
53+
assert.throws(
5454
() => new errors.codes.TEST_ERROR_1(),
55-
'Code: TEST_ERROR_1; The provided arguments ' +
56-
'length (0) does not match the required ones (1).'
55+
{
56+
message: /^Code: TEST_ERROR_1; The provided arguments length \(0\) does not match the required ones \(1\)\./,
57+
name: 'Error',
58+
code: 'ERR_INTERNAL_ASSERTION'
59+
}
5760
);
5861
}
5962

test/sequential/test-fs-watch.js

Lines changed: 6 additions & 2 deletions

0 commit comments

Comments
 (0)