LibJS/Tests: Add length test for Temporal.Instant.prototype.round()

This commit is contained in:
Linus Groh 2021-08-07 01:10:15 +01:00
parent cdb0c879d3
commit 6762378f89
Notes: sideshowbarker 2024-07-18 07:19:18 +09:00

View file

@ -1,4 +1,8 @@
describe("correct behavior", () => {
test("length is 1", () => {
expect(Temporal.Instant.prototype.round).toHaveLength(1);
});
test("basic functionality", () => {
const instant = new Temporal.Instant(1111111111111n);
expect(instant.round({ smallestUnit: "second" }).epochNanoseconds).toBe(1111000000000n);