mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibJS: Make RegExp.prototype.flags spec-compliant
This should be using the individual flag boolean properties rather than the [[OriginalFlags]] internal slot. Use an enumerator macro here for brevity, this will be useful for other things as well. :^)
This commit is contained in:
parent
5cb45e4feb
commit
ee66eaa1b0
Notes:
sideshowbarker
2024-07-19 01:14:08 +09:00
Author: https://github.com/linusg
Commit: ee66eaa1b0
Pull-request: https://github.com/SerenityOS/serenity/pull/4190
3 changed files with 38 additions and 15 deletions
|
@ -0,0 +1,10 @@
|
|||
test("basic functionality", () => {
|
||||
expect(/foo/.flags).toBe("");
|
||||
expect(/foo/g.flags).toBe("g");
|
||||
expect(/foo/i.flags).toBe("i");
|
||||
expect(/foo/m.flags).toBe("m");
|
||||
expect(/foo/s.flags).toBe("s");
|
||||
expect(/foo/u.flags).toBe("u");
|
||||
expect(/foo/y.flags).toBe("y");
|
||||
expect(/foo/sgimyu.flags).toBe("gimsuy");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue