mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibJS: Implement a nearly empty Intl.DisplayNames object
This adds plumbing for the Intl.DisplayNames object, constructor, and prototype.
This commit is contained in:
committed by
Linus Groh
parent
137e98cb6f
commit
0fb4e8b749
Notes:
sideshowbarker
2024-07-18 05:15:39 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0fb4e8b749d Pull-request: https://github.com/SerenityOS/serenity/pull/9599 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/davidot Reviewed-by: https://github.com/linusg ✅
@@ -0,0 +1,13 @@
|
||||
describe("errors", () => {
|
||||
test("called without new", () => {
|
||||
expect(() => {
|
||||
Intl.DisplayNames();
|
||||
}).toThrowWithMessage(TypeError, "Intl.DisplayNames constructor must be called with 'new'");
|
||||
});
|
||||
});
|
||||
|
||||
describe("normal behavior", () => {
|
||||
test("length is 2", () => {
|
||||
expect(Intl.DisplayNames).toHaveLength(2);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user