summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/string-endswith.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/string-endswith.js')
-rw-r--r--deps/v8/test/mjsunit/es6/string-endswith.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/es6/string-endswith.js b/deps/v8/test/mjsunit/es6/string-endswith.js
index cbf2ed8766..4246f166a4 100644
--- a/deps/v8/test/mjsunit/es6/string-endswith.js
+++ b/deps/v8/test/mjsunit/es6/string-endswith.js
@@ -408,3 +408,11 @@ assertThrows(function() {
"toString": function() { return "abc"; }
}, [/./]);
}, TypeError);
+
+// endsWith does its brand checks with Symbol.match
+var re = /./;
+assertThrows(function() {
+ "".startsWith(re);
+}, TypeError);
+re[Symbol.match] = false;
+assertEquals(false, "".startsWith(re));