LibJS/Tests: Add length test for Temporal.Instant.prototype.round()
This commit is contained in:
parent
cdb0c879d3
commit
6762378f89
Notes:
sideshowbarker
2024-07-18 07:19:18 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/6762378f890 Pull-request: https://github.com/SerenityOS/serenity/pull/9251
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue