summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/function/function-toString-lazy-name.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/function/function-toString-lazy-name.js')
-rw-r--r--js/src/jit-test/tests/function/function-toString-lazy-name.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/function/function-toString-lazy-name.js b/js/src/jit-test/tests/function/function-toString-lazy-name.js
new file mode 100644
index 0000000000..088cd26e39
--- /dev/null
+++ b/js/src/jit-test/tests/function/function-toString-lazy-name.js
@@ -0,0 +1,7 @@
+assertEq(Map.prototype.set.toString().includes("function set()"), true);
+assertEq(Object.getOwnPropertyDescriptor(Map.prototype, 'size').get.toString().includes("function size()"), true);
+assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.toString().includes("function flags()"), true);
+
+assertEq(Map.prototype.set.toSource().includes("function set()"), true);
+assertEq(Object.getOwnPropertyDescriptor(Map.prototype, 'size').get.toSource().includes("function get size()"), true);
+assertEq(Object.getOwnPropertyDescriptor(RegExp.prototype, 'flags').get.toSource().includes("function get flags()"), true);