diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-09-05 23:05:16 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-06 23:49:56 +0100 |
commit | 8e75e5fabba920de2e813677029a55eb79b1a06a (patch) | |
tree | db7e93d1eb8dd9eef7e62f0dc20ec06ea468509d /Userland/Libraries/LibJS/Tests/builtins | |
parent | 4ad2159812014fafb94eb7978432a9df6f5cec90 (diff) | |
download | serenity-8e75e5fabba920de2e813677029a55eb79b1a06a.zip |
LibJS: Implement a nearly empty Intl.ListFormat object
This adds plumbing for the Intl.ListFormat object, constructor, and
prototype.
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/builtins')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.@@toStringTag.js | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.js | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.@@toStringTag.js b/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.@@toStringTag.js new file mode 100644 index 0000000000..4a1c258316 --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.@@toStringTag.js @@ -0,0 +1,3 @@ +test("basic functionality", () => { + expect(Intl.ListFormat.prototype[Symbol.toStringTag]).toBe("Intl.ListFormat"); +}); diff --git a/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.js b/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.js new file mode 100644 index 0000000000..9f0ac10931 --- /dev/null +++ b/Userland/Libraries/LibJS/Tests/builtins/Intl/ListFormat/ListFormat.js @@ -0,0 +1,13 @@ +describe("errors", () => { + test("called without new", () => { + expect(() => { + Intl.ListFormat(); + }).toThrowWithMessage(TypeError, "Intl.ListFormat constructor must be called with 'new'"); + }); +}); + +describe("normal behavior", () => { + test("length is 0", () => { + expect(Intl.ListFormat).toHaveLength(0); + }); +}); |