Skip to content

Commit

Permalink
test: improve coverage for 'internal/errors'
Browse files Browse the repository at this point in the history
PR-URL: #16055
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
ruxandrafed authored and MylesBorins committed Oct 23, 2017
1 parent fbd3c80 commit d1080f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-internal-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,15 @@ assert.throws(
message: /^At least one arg needs to be specified$/
}));

// Test ERR_ENCODING_NOT_SUPPORTED
assert.strictEqual(
errors.message('ERR_ENCODING_NOT_SUPPORTED', ['enc']),
'The "enc" encoding is not supported');

// Test ERR_HTTP2_HEADER_REQUIRED
assert.strictEqual(
errors.message('ERR_HTTP2_HEADER_REQUIRED', ['test']),
'The test header is required');

// Test that `code` property is mutable and that changing it does not change the
// name.
Expand Down

0 comments on commit d1080f8

Please sign in to comment.