1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibJS: Add Number.prototype.toString

This commit is contained in:
Matthew Olsson 2020-07-14 15:26:15 -07:00 committed by Andreas Kling
parent ec3737510d
commit 02305d01ea
6 changed files with 189 additions and 4 deletions

View file

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