diff --git a/test/intl402/NumberFormat/prototype/format/default-value.js b/test/intl402/NumberFormat/prototype/format/default-value.js index 54a9996d6a..a8eb83d91a 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 3e7cb30772..1b83c3368f 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 3e095893ea..ea60ed023b 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 28f41cf54c..bc72bf7bc6 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.` ); });