mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +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
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