mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +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:
parent
e7d3483618
commit
2c10e9fdd3
12 changed files with 235 additions and 2 deletions
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Intl.Locale.prototype[Symbol.toStringTag]).toBe("Intl.Locale");
|
||||
});
|
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue