Skip to content

Commit

Permalink
test: increase coverage for internal/errors.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
starkwang authored and BridgeAR committed Aug 30, 2017
1 parent a80b162 commit 44d4865
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/parallel/test-internal-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE',
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE',
['a', 'b', null]),
'The "a" argument must be of type b. Received type null');
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE', ['a', 'not b']),
'The "a" argument must not be of type b');
assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE', ['a.b', 'not c']),
'The "a.b" property must not be of type c');
assert.strictEqual(
errors.message('ERR_INVALID_ARG_TYPE', ['first argument', 'c']),
'The first argument must be of type c');
assert.strictEqual(
errors.message('ERR_INVALID_ARG_TYPE', [['a', 'b', 'c'], 'not d']),
'The "a", "b", "c" arguments must not be of type d');

// Test ERR_INVALID_URL_SCHEME
assert.strictEqual(errors.message('ERR_INVALID_URL_SCHEME', ['file']),
Expand Down

0 comments on commit 44d4865

Please sign in to comment.