Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
bergeron committed Oct 31, 2024
1 parent c50620c commit ad39686
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('fetchMultiChainBalances()', () => {
it('should successfully return balances response', async () => {
const mockAPI = createMockAPI().reply(200, MOCK_GET_BALANCES_RESPONSE);

const result = await fetchMultiChainBalances(MOCK_ADDRESS);
const result = await fetchMultiChainBalances(MOCK_ADDRESS, {}, 'extension');
expect(result).toBeDefined();
expect(result).toStrictEqual(MOCK_GET_BALANCES_RESPONSE);
expect(mockAPI.isDone()).toBe(true);
Expand All @@ -59,9 +59,13 @@ describe('fetchMultiChainBalances()', () => {
})
.reply(200, MOCK_GET_BALANCES_RESPONSE);

const result = await fetchMultiChainBalances(MOCK_ADDRESS, {
networks: [1, 10],
});
const result = await fetchMultiChainBalances(
MOCK_ADDRESS,
{
networks: [1, 10],
},
'extension',
);
expect(result).toBeDefined();
expect(result).toStrictEqual(MOCK_GET_BALANCES_RESPONSE);
expect(mockAPI.isDone()).toBe(true);
Expand All @@ -79,7 +83,8 @@ describe('fetchMultiChainBalances()', () => {
const mockAPI = createMockAPI().reply(httpCode);

await expect(
async () => await fetchMultiChainBalances(MOCK_ADDRESS),
async () =>
await fetchMultiChainBalances(MOCK_ADDRESS, {}, 'extension'),
).rejects.toThrow(expect.any(Error));
expect(mockAPI.isDone()).toBe(true);
},
Expand Down

0 comments on commit ad39686

Please sign in to comment.