diff options
author | Linus Groh <mail@linusgroh.de> | 2021-11-19 20:43:52 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-20 23:10:09 +0000 |
commit | 98b876ad3f3d59dd83c91f8db0ea052ecde1d908 (patch) | |
tree | 6e664c891bf6c12d1fd276a2b1494f79e185df7a /Userland/Libraries/LibJS/Tests/builtins | |
parent | 3b1de431cc35c8886dd498ade0c9a90b268a95a1 (diff) | |
download | serenity-98b876ad3f3d59dd83c91f8db0ea052ecde1d908.zip |
LibJS: Implement parsing of TemporalZonedDateTimeString
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/builtins')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/builtins/Temporal/ZonedDateTime/ZonedDateTime.from.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/Temporal/ZonedDateTime/ZonedDateTime.from.js b/Userland/Libraries/LibJS/Tests/builtins/Temporal/ZonedDateTime/ZonedDateTime.from.js index 7e9f9f9538..b662e9ce9b 100644 --- a/Userland/Libraries/LibJS/Tests/builtins/Temporal/ZonedDateTime/ZonedDateTime.from.js +++ b/Userland/Libraries/LibJS/Tests/builtins/Temporal/ZonedDateTime/ZonedDateTime.from.js @@ -148,4 +148,10 @@ describe("errors", () => { }); }).toThrowWithMessage(TypeError, "Required property day is missing or undefined"); }); + + test("invalid zoned date time string", () => { + expect(() => { + Temporal.ZonedDateTime.from("foo"); + }).toThrowWithMessage(RangeError, "Invalid zoned date time string 'foo'"); + }); }); |