mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
LibJS: Implement RegExp.prototype.toString() as standalone function
This should not just inherit Object.prototype.toString() (and override Object::to_string()) but be its own function, i.e. 'RegExp.prototype.toString !== Object.prototype.toString'.
This commit is contained in:
parent
41837f548d
commit
e163db248d
5 changed files with 38 additions and 10 deletions
|
@ -0,0 +1,5 @@
|
|||
test("basic functionality", () => {
|
||||
expect(RegExp.prototype.toString).toHaveLength(0);
|
||||
|
||||
expect(/test/g.toString()).toBe("/test/g");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue