mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 18:47:15 +02:00
LibJS: Remove fallback value for get_offset_nanoseconds_for
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/664f02d Note that the tests are not comprehensive.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 01:03:27 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/3666d2132b4 Pull-request: https://github.com/SerenityOS/serenity/pull/10943 Reviewed-by: https://github.com/linusg
@@ -170,3 +170,12 @@ describe("errors", () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("custom time zone doesn't have a getOffsetNanosecondsFor function", () => {
|
||||
const zonedDateTime = new Temporal.ZonedDateTime(0n, {});
|
||||
expect(() => {
|
||||
Temporal.PlainDateTime.from(zonedDateTime);
|
||||
}).toThrowWithMessage(TypeError, "null is not a function");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user