test: add bigintHelpers.spec.ts

This commit is contained in:
c4605
2024-08-28 10:52:56 +01:00
parent 980b164b1a
commit 85f112a0f2

View File

@@ -0,0 +1,16 @@
import { describe, it, expect } from "vitest"
import { max, sum } from "./bigintHelpers"
describe("bigintHelpers", () => {
describe("sum", () => {
it("should return the sum of an array of bigints", () => {
expect(sum([1n, 2n, 3n])).toBe(6n)
})
})
describe("max", () => {
it("should return the max of an array of bigints", () => {
expect(max([1n, 2n, 3n])).toBe(3n)
})
})
})