import { strict as assert } from "assert" import { sum } from "./sum.js" export function testSumResult() { const a = 1 const b = 2 const result = sum(a, b) assert(result === a + b, "the result should be the sum of its arguments") } export function testSumNoArgs() { try { sum() } catch (_) { return } assert.fail("should fail if not provided any arguments") } export function testSumMissingArg() { const a = 1 try { sum(a) } catch (_) { return } assert.fail("should fail if not provided all arguments") } export function testWillFail() { assert.fail("I have failed!") }