A test arranges, acts and asserts. Network calls are mocked so tests stay deterministic; async tests must await the work before asserting.
test("formats wei", () => {
expect(format(1500000000000000000n)).toBe("1.5");
});Test behaviour, not implementation details — tests coupled to internals break on every refactor.