summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests/builtins/RegExp/RegExp.js
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Tests/builtins/RegExp/RegExp.js')
-rw-r--r--Libraries/LibJS/Tests/builtins/RegExp/RegExp.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/Libraries/LibJS/Tests/builtins/RegExp/RegExp.js b/Libraries/LibJS/Tests/builtins/RegExp/RegExp.js
index aa18a0b907..9ae8ab97c0 100644
--- a/Libraries/LibJS/Tests/builtins/RegExp/RegExp.js
+++ b/Libraries/LibJS/Tests/builtins/RegExp/RegExp.js
@@ -1,9 +1,8 @@
test("basic functionality", () => {
- // FIXME: update when toString is spec-compliant
- expect(RegExp().toString()).toBe("//");
- expect(RegExp(undefined).toString()).toBe("//");
+ expect(RegExp().toString()).toBe("/(?:)/");
+ expect(RegExp(undefined).toString()).toBe("/(?:)/");
expect(RegExp("foo").toString()).toBe("/foo/");
expect(RegExp("foo", undefined).toString()).toBe("/foo/");
expect(RegExp("foo", "g").toString()).toBe("/foo/g");
- expect(RegExp(undefined, "g").toString()).toBe("//g");
+ expect(RegExp(undefined, "g").toString()).toBe("/(?:)/g");
});