Skip to content

Commit 2112b70

Browse files
mhdawsonaddaleax
authored andcommitted
test: improve code coverage for i18n
Coverage report for src/node_i18n.cc shows that the Has() method is not covered. This test adds coverage for that method. PR-URL: #25428 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent bb7f71a commit 2112b70

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/parallel/test-icu-punycode.js

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ const { internalBinding } = require('internal/test/binding');
99
const icu = internalBinding('icu');
1010
const assert = require('assert');
1111

12+
// test hasConverter method
13+
assert(icu.hasConverter('utf-8'),
14+
'hasConverter should report coverter exists for utf-8');
15+
assert(!icu.hasConverter('x'),
16+
'hasConverter should report coverter does not exist for x');
17+
1218
const tests = require('../fixtures/url-idna.js');
1319
const fixtures = require('../common/fixtures');
1420
const wptToASCIITests = require(

0 commit comments

Comments
 (0)