Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dohaki committed Sep 23, 2024
1 parent ee20a74 commit a6a5073
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/api/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,32 @@ describe("API Test", () => {
test("limits has no load-time errors", async () => {
await limitsHandler(request as TypedVercelRequest<any>, response);
expect(response.status).toHaveBeenCalledWith(400);
expect(response.send).toHaveBeenCalledWith(
expect.stringMatching(/At path: destinationChainId/)
expect(response.json).toHaveBeenCalledWith(
expect.objectContaining(/At path: destinationChainId/)
);
});

test("suggested-fees has no load-time errors", async () => {
await feesHandler(request as TypedVercelRequest<any>, response);
expect(response.status).toHaveBeenCalledWith(400);
expect(response.send).toHaveBeenCalledWith(
expect.stringMatching(/At path: amount/)
expect(response.json).toHaveBeenCalledWith(
expect.objectContaining(/At path: amount/)
);
});

test("pools has no load-time errors", async () => {
await poolsHandler(request as TypedVercelRequest<any>, response);
expect(response.status).toHaveBeenCalledWith(400);
expect(response.send).toHaveBeenCalledWith(
expect.stringMatching(/At path: token/)
expect(response.json).toHaveBeenCalledWith(
expect.objectContaining(/At path: token/)
);
});

test("coingecko has no load-time errors", async () => {
await coingeckoHandler(request as TypedVercelRequest<any>, response);
expect(response.status).toHaveBeenCalledWith(400);
expect(response.send).toHaveBeenCalledWith(
expect.stringMatching(/At path: l1Token/)
expect(response.json).toHaveBeenCalledWith(
expect.objectContaining(/At path: l1Token/)
);
});

Expand Down

0 comments on commit a6a5073

Please sign in to comment.