Skip to content

Commit 44d4865

Browse files
starkwangBridgeAR
authored andcommitted
test: increase coverage for internal/errors.js
PR-URL: #15044 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a80b162 commit 44d4865

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/parallel/test-internal-errors.js

+10
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@ assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE',
199199
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE',
200200
['a', 'b', null]),
201201
'The "a" argument must be of type b. Received type null');
202+
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE', ['a', 'not b']),
203+
'The "a" argument must not be of type b');
204+
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE', ['a.b', 'not c']),
205+
'The "a.b" property must not be of type c');
206+
assert.strictEqual(
207+
errors.message('ERR_INVALID_ARG_TYPE', ['first argument', 'c']),
208+
'The first argument must be of type c');
209+
assert.strictEqual(
210+
errors.message('ERR_INVALID_ARG_TYPE', [['a', 'b', 'c'], 'not d']),
211+
'The "a", "b", "c" arguments must not be of type d');
202212

203213
// Test ERR_INVALID_URL_SCHEME
204214
assert.strictEqual(errors.message('ERR_INVALID_URL_SCHEME', ['file']),

0 commit comments

Comments
 (0)