1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:37:34 +00:00

LibJS: Implement a nearly empty Intl.Locale object

This adds plumbing for the Intl.Locale object, constructor, and
prototype.
This commit is contained in:
Timothy Flynn 2021-09-02 08:32:43 -04:00 committed by Linus Groh
parent e7d3483618
commit 2c10e9fdd3
12 changed files with 235 additions and 2 deletions

View file

@ -0,0 +1,3 @@
test("basic functionality", () => {
expect(Intl.Locale.prototype[Symbol.toStringTag]).toBe("Intl.Locale");
});

View file

@ -0,0 +1,13 @@
describe("errors", () => {
test("called without new", () => {
expect(() => {
Intl.Locale();
}).toThrowWithMessage(TypeError, "Intl.Locale constructor must be called with 'new'");
});
});
describe("normal behavior", () => {
test("length is 1", () => {
expect(Intl.Locale).toHaveLength(1);
});
});