mirror of
https://github.com/Brotocol-xyz/bro-sdk.git
synced 2026-04-29 20:05:14 +08:00
test: add bigintHelpers.spec.ts
This commit is contained in:
16
src/utils/bigintHelpers.spec.ts
Normal file
16
src/utils/bigintHelpers.spec.ts
Normal 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)
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user