Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Oct 1, 2024
1 parent 025ceb6 commit e9ce15f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/internal/hooks/useIcon.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { renderHook } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import { coinbasePaySvg } from '../svg/coinbasePaySvg';
import { fundWalletSvg } from '../svg/fundWallet';
import { swapSettingsSvg } from '../svg/swapSettings';
import { walletSvg } from '../svg/walletSvg';
Expand All @@ -16,6 +17,11 @@ describe('useIcon', () => {
expect(result.current).toBe(walletSvg);
});

it('should return coinbasePaySvg when icon is "coinbasePay"', () => {
const { result } = renderHook(() => useIcon({ icon: 'coinbasePay' }));
expect(result.current).toBe(coinbasePaySvg);
});

it('should return fundWalletSvg when icon is "fundWallet"', () => {
const { result } = renderHook(() => useIcon({ icon: 'fundWallet' }));
expect(result.current).toBe(fundWalletSvg);
Expand Down

0 comments on commit e9ce15f

Please sign in to comment.