mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
LibJS/Tests: Add length test for Temporal.Instant.prototype.round()
This commit is contained in:
parent
cdb0c879d3
commit
6762378f89
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,8 @@
|
||||||
describe("correct behavior", () => {
|
describe("correct behavior", () => {
|
||||||
|
test("length is 1", () => {
|
||||||
|
expect(Temporal.Instant.prototype.round).toHaveLength(1);
|
||||||
|
});
|
||||||
|
|
||||||
test("basic functionality", () => {
|
test("basic functionality", () => {
|
||||||
const instant = new Temporal.Instant(1111111111111n);
|
const instant = new Temporal.Instant(1111111111111n);
|
||||||
expect(instant.round({ smallestUnit: "second" }).epochNanoseconds).toBe(1111000000000n);
|
expect(instant.round({ smallestUnit: "second" }).epochNanoseconds).toBe(1111000000000n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue