Skip to content

Commit

Permalink
mock changed
Browse files Browse the repository at this point in the history
  • Loading branch information
SKarolFolio committed Nov 18, 2024
1 parent cb987a0 commit a6af673
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/__tests__/common/hooks/useConfig.hook.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MockServicesProvider } from '@src/test/__mocks__/providers/ServicesProvider.mock';
import '@src/test/__mocks__/common/hooks/useServicesContext.mock';
import { renderHook } from '@testing-library/react';
import { useRecoilState, useSetRecoilState } from 'recoil';
import { useConfig } from '@common/hooks/useConfig.hook';
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('useConfig', () => {
},
};

const { result } = renderHook(useConfig, { wrapper: MockServicesProvider });
const { result } = renderHook(useConfig);
const preparedFields = result.current.prepareFields(profiles);

expect(setPreparedFields).toHaveBeenCalledWith(testResult);
Expand All @@ -126,7 +126,7 @@ describe('useConfig', () => {
mockUseRecoilState();
(fetchProfiles as jest.Mock).mockImplementation(() => profiles);

const { result } = renderHook(useConfig, { wrapper: MockServicesProvider });
const { result } = renderHook(useConfig);
const resultProfiles = await result.current.getProfiles({ record, recordId: '' });

expect(fetchProfiles).toHaveBeenCalled();
Expand All @@ -137,7 +137,7 @@ describe('useConfig', () => {
test('does not call "fetchProfiles" and "setProfiles" and returns a stored array of profiles', async () => {
mockUseRecoilState(profiles);

const { result } = renderHook(useConfig, { wrapper: MockServicesProvider });
const { result } = renderHook(useConfig);

const resultProfiles = await result.current.getProfiles({ record, recordId: '' });

Expand Down

0 comments on commit a6af673

Please sign in to comment.