@xswap-link/sdk
Version:
JavaScript SDK for XSwap platform
21 lines (15 loc) • 484 B
text/typescript
import fetchMock from "jest-fetch-mock";
import { getChains } from "../../src/services";
const chains = ["test", "test2", "test3", "test4"];
describe("API", () => {
beforeEach(() => {
fetchMock.resetMocks();
});
describe("getChains", () => {
it("should return all supported chains", async () => {
fetchMock.mockResponse(JSON.stringify(chains));
const supportedChains = await getChains();
expect(supportedChains).toHaveLength(4);
});
});
});