mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +00:00
LibJS: Implement String.prototype[@@toPrimitive]()
This commit is contained in:
parent
e9a0759b16
commit
b661363dfe
3 changed files with 16 additions and 2 deletions
|
@ -0,0 +1,5 @@
|
|||
test("basic functionality", () => {
|
||||
const s = Symbol();
|
||||
expect(s[Symbol.toPrimitive]("string")).toBe(s);
|
||||
expect(s[Symbol.toPrimitive]("number")).toBe(s);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue