Skip to content

Commit d1080f8

Browse files
ruxandrafedMylesBorins
authored andcommitted
test: improve coverage for 'internal/errors'
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]>
1 parent fbd3c80 commit d1080f8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/parallel/test-internal-errors.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ assert.throws(
236236
message: /^At least one arg needs to be specified$/
237237
}));
238238

239+
// Test ERR_ENCODING_NOT_SUPPORTED
240+
assert.strictEqual(
241+
errors.message('ERR_ENCODING_NOT_SUPPORTED', ['enc']),
242+
'The "enc" encoding is not supported');
243+
244+
// Test ERR_HTTP2_HEADER_REQUIRED
245+
assert.strictEqual(
246+
errors.message('ERR_HTTP2_HEADER_REQUIRED', ['test']),
247+
'The test header is required');
239248

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

0 commit comments

Comments
 (0)