diff options
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'"); + }); }); |