Skip to content

Commit c9f3189

Browse files
committedJun 20, 2024
chore: fix test cases for lodash mock
1 parent 0a2effc commit c9f3189

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/components/Modals/NicknameModal/__tests__/NicknameModal.spec.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ const mockedUseAdvertiserCreate = api.advertiser.useCreate as jest.MockedFunctio
1010
const mockPush = jest.fn();
1111
const mockUseAdvertiserInfoState = useAdvertiserInfoState as jest.MockedFunction<typeof useAdvertiserInfoState>;
1212

13-
jest.mock('lodash', () => ({
14-
...jest.requireActual('lodash'),
15-
debounce: jest.fn(f => f),
13+
jest.mock('lodash/debounce', () => ({
14+
...jest.requireActual('lodash/debounce'),
15+
__esModule: true,
16+
default: jest.fn(f => f),
1617
}));
1718

1819
jest.mock('react-router-dom', () => ({

0 commit comments

Comments
 (0)