Unit tests isolate units of code. Asynchronous network requests and provider RPC calls should be mocked to ensure deterministic, fast test runs.
js
test("formats wei to ether correctly", () => {
expect(formatEther(1000000000000000000n)).toBe("1.0");
});