summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/typedarray-tostring.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/typedarray-tostring.js')
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-tostring.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/es6/typedarray-tostring.js b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
index f388881494..0ae210eddc 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-tostring.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
@@ -91,8 +91,12 @@ for (var constructor of typedArrayConstructors) {
let NumberToLocaleString = Number.prototype.toLocaleString;
Number.prototype.toLocaleString = pushArgs("Number");
+ // According to the ECMA-402 specification, the optional arguments locales
+ // and options must be passed. Without the ECMA-402 internationalization
+ // API, the optional arguments must not be passed.
+ const noArgs = (typeof Intl !== "object") ? [] : [undefined, undefined];
(new constructor([1, 2])).toLocaleString();
- assertEquals(["Number", [], "Number", []], log);
+ assertEquals(["Number", noArgs, "Number", noArgs], log);
Number.prototype.toLocaleString = NumberToLocaleString;
})();