-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathAddressCopy.test.tsx
More file actions
29 lines (23 loc) · 792 Bytes
/
AddressCopy.test.tsx
File metadata and controls
29 lines (23 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react';
import AddressCopy from './AddressCopy';
import { WalletViewSelectorsIDs } from '../../Views/Wallet/WalletView.testIds';
import renderWithProvider from '../../../util/test/renderWithProvider';
// Mock navigation before importing renderWithProvider
jest.mock('@react-navigation/native', () => ({
...jest.requireActual('@react-navigation/native'),
useNavigation: () => ({
navigate: jest.fn(),
}),
}));
const renderAddressCopy = () => renderWithProvider(<AddressCopy />);
describe('AddressCopy', () => {
beforeEach(() => {
jest.clearAllMocks();
});
it('renders the copy button', () => {
const { getByTestId } = renderAddressCopy();
expect(
getByTestId(WalletViewSelectorsIDs.ACCOUNT_COPY_BUTTON),
).toBeDefined();
});
});