From 2112b707e6d063e90fd1ba22752876663d20626f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 9 Jan 2019 22:52:06 -0500 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/25428 Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- test/parallel/test-icu-punycode.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/parallel/test-icu-punycode.js b/test/parallel/test-icu-punycode.js index 2501b1d86e7b88..35dab6232f34bc 100644 --- a/test/parallel/test-icu-punycode.js +++ b/test/parallel/test-icu-punycode.js @@ -9,6 +9,12 @@ const { internalBinding } = require('internal/test/binding'); const icu = internalBinding('icu'); const assert = require('assert'); +// test hasConverter method +assert(icu.hasConverter('utf-8'), + 'hasConverter should report coverter exists for utf-8'); +assert(!icu.hasConverter('x'), + 'hasConverter should report coverter does not exist for x'); + const tests = require('../fixtures/url-idna.js'); const fixtures = require('../common/fixtures'); const wptToASCIITests = require(