1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

LibJS: Implement spec-compliant Object.prototype.toString

This commit is contained in:
Matthew Olsson 2020-07-11 10:11:37 -07:00 committed by Andreas Kling
parent caa11503b1
commit 5ecd504f4e
4 changed files with 53 additions and 12 deletions

View file

@ -16,9 +16,7 @@ describe("normal behavior", () => {
});
test("number stringification differs from regular toString, for now", () => {
expect([1, 2, 3].toLocaleString()).toBe(
"[object NumberObject],[object NumberObject],[object NumberObject]"
);
expect([1, 2, 3].toLocaleString()).toBe("[object Number],[object Number],[object Number]");
});
test("null and undefined result in empty strings", () => {