diff --git a/test/intl402/NumberFormat/prototype/format/default-value.js b/test/intl402/NumberFormat/prototype/format/default-value.js index 54a9996d6ac62410c65fe4da7a21785b54b57817..a8eb83d91abd351e9f5ddcae7fcf471eea18c571 100644 --- a/test/intl402/NumberFormat/prototype/format/default-value.js +++ b/test/intl402/NumberFormat/prototype/format/default-value.js @@ -7,11 +7,17 @@ description: > Tests that the default value for the argument of Intl.NumberFormat.prototype.format (value) is undefined. info: | - 11.1.4Number Format Functions + 11.1.4 Number Format Functions 3. If value is not provided, let value be undefined. + 4. Let x be ? ToNumber(value). ---*/ const nf = new Intl.NumberFormat(); -assert.sameValue(nf.format(), NaN); -assert.sameValue(nf.format(undefined), NaN); + +// In most locales this is string "NaN", but there are exceptions, cf. "ليس رقم" +// in Arabic, "epäluku" in Finnish, "не чиÑло" in Russian, "son emas" in Uzbek etc. +const resultNaN = nf.format(NaN); + +assert.sameValue(nf.format(), resultNaN); +assert.sameValue(nf.format(undefined), resultNaN); diff --git a/test/intl402/NumberFormat/prototype/format/this-value-not-numberformat.js b/test/intl402/NumberFormat/prototype/format/this-value-not-numberformat.js index 3e7cb30772b970edae53ba62e1566f8ce5ee4e50..1b83c3368f478df6c9040005431f3cd20d7ceca2 100644 --- a/test/intl402/NumberFormat/prototype/format/this-value-not-numberformat.js +++ b/test/intl402/NumberFormat/prototype/format/this-value-not-numberformat.js @@ -16,6 +16,6 @@ invalidTargets.forEach(target => { assert.throws( TypeError, () => fn.call(target), - `Calling format getter on ${target} should throw a TypeError.` + `Calling format getter on ${String(target)} should throw a TypeError.` ); }); diff --git a/test/intl402/NumberFormat/prototype/formatToParts/this-value-not-numberformat.js b/test/intl402/NumberFormat/prototype/formatToParts/this-value-not-numberformat.js index 3e095893eab2fa0f546024b96da479e075b9512d..ea60ed023b6c59ab5dbc348a837266879a44fc41 100644 --- a/test/intl402/NumberFormat/prototype/formatToParts/this-value-not-numberformat.js +++ b/test/intl402/NumberFormat/prototype/formatToParts/this-value-not-numberformat.js @@ -16,6 +16,6 @@ invalidTargets.forEach(target => { assert.throws( TypeError, () => fn.call(target), - `Calling formatToParts on ${target} should throw a TypeError.` + `Calling formatToParts on ${String(target)} should throw a TypeError.` ); }); diff --git a/test/intl402/NumberFormat/prototype/resolvedOptions/this-value-not-numberformat.js b/test/intl402/NumberFormat/prototype/resolvedOptions/this-value-not-numberformat.js index 28f41cf54ce28f70c658237f0b22a77098ba088d..bc72bf7bc6e69e95e0e2783727bdfb4eede041af 100644 --- a/test/intl402/NumberFormat/prototype/resolvedOptions/this-value-not-numberformat.js +++ b/test/intl402/NumberFormat/prototype/resolvedOptions/this-value-not-numberformat.js @@ -16,6 +16,6 @@ invalidTargets.forEach(target => { assert.throws( TypeError, () => fn.call(target), - `Calling resolvedOptions on ${target} should throw a TypeError.` + `Calling resolvedOptions on ${String(target)} should throw a TypeError.` ); });