1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

LibJS: Implement String.prototype[@@toPrimitive]()

This commit is contained in:
Linus Groh 2021-06-06 16:53:32 +01:00 committed by Andreas Kling
parent e9a0759b16
commit b661363dfe
3 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,5 @@
test("basic functionality", () => {
const s = Symbol();
expect(s[Symbol.toPrimitive]("string")).toBe(s);
expect(s[Symbol.toPrimitive]("number")).toBe(s);
});