import { expect, test } from "vitest" import { add } from "#Source/calc/add.ts" test("add returns the sum of two numbers", () => { expect(add(1, 2)).toBe(3) expect(add(-5, 2.5)).toBe(-2.5) }) test("add throws when either argument is not a number", () => { expect(() => add("1" as unknown as number, 2)).toThrow("Both arguments must be numbers") expect(() => add(1, null as unknown as number)).toThrow("Both arguments must be numbers") })