import { describe, expect, it } from "bun:test" import { TOKEN_ADDRESSES, getWrappedNativeAddress } from "./constants" describe("getWrappedNativeAddress", () => { it("should return the correct WRAPPED_NATIVE address for each supported chain ID", () => { for (const chainId in TOKEN_ADDRESSES) { const chainData = TOKEN_ADDRESSES[chainId] if (chainData.WRAPPED_NATIVE) { expect(getWrappedNativeAddress(Number(chainId))).toBe( chainData.WRAPPED_NATIVE ) } } }) it("should throw an error for unsupported chain IDs", () => { const unsupportedChainIds = [-1, 9999, 123456] // Example of unsupported chain IDs for (const chainId of unsupportedChainIds) { expect(() => getWrappedNativeAddress(chainId)).toThrow( `Chain ${chainId} not supported` ) } }) })