Skip to content

Commit

Permalink
mock axelar assets and chains
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseRFelix committed Jun 9, 2024
1 parent ec85355 commit e774bf8
Show file tree
Hide file tree
Showing 2 changed files with 713 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/bridge/src/axelar/__tests__/external-urls.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { rest } from "msw";

import { server } from "../../__tests__/msw";
import { NativeEVMTokenConstantAddress } from "../../ethereum";
import { getAxelarExternalUrl } from "../external-urls";
import {
MockAxelarAssets,
MockAxelarChains,
} from "./mock-axelar-assets-and-chains";

beforeEach(() => {
server.use(
rest.get("https://api.axelarscan.io/api/getAssets", (_req, res, ctx) => {
return res(ctx.json(MockAxelarAssets));
}),
rest.get("https://api.axelarscan.io/api/getChains", (_req, res, ctx) => {
return res(ctx.json(MockAxelarChains));
})
);
});

describe("getAxelarExternalUrl", () => {
it("should return the correct URL for Weth <> axlEth", async () => {
Expand Down
Loading

0 comments on commit e774bf8

Please sign in to comment.