mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:17:36 +00:00
LibJS: Add Temporal.Instant.from()
This commit is contained in:
parent
33cf6274e8
commit
84403ab423
3 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 1", () => {
|
||||
expect(Temporal.Instant.from).toHaveLength(1);
|
||||
});
|
||||
|
||||
test("Instant instance argument", () => {
|
||||
const instant = new Temporal.Instant(123n);
|
||||
expect(Temporal.Instant.from(instant).epochNanoseconds).toBe(123n);
|
||||
});
|
||||
|
||||
// Un-skip once ParseISODateTime & ParseTemporalTimeZoneString are implemented
|
||||
test.skip("Instant string argument", () => {
|
||||
expect(Temporal.Instant.from("1975-02-02T14:25:36.123456789Z").epochNanoseconds).toBe(
|
||||
160583136123456789n
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue