Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Updated useAutomaticSchedulerMutation.test 'act' to async to fix brea…
Browse files Browse the repository at this point in the history
…k from renderHook import update
  • Loading branch information
danetsao committed Oct 2, 2023
1 parent ba89cf2 commit cf5c1ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/mutators/useAutomaticSchedulerMutation.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CalloutContext } from '@folio/stripes/core';
import { waitFor, act, renderHook } from '@testing-library/react';
import { waitFor, act } from '@testing-library/react';
import { renderHook } from '@testing-library/react-hooks';
import React, { ReactNode } from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import useAutomaticSchedulerMutation from './useAutomaticSchedulerMutation';
Expand Down Expand Up @@ -159,7 +160,7 @@ describe('Automatic scheduling mutation', () => {

await waitFor(() => expect(getMock).toHaveBeenCalled());

act(() => {
await act(async () => {
mutator.current({
bursar: 'bursar data',
scheduling: { schedulingData: 'is here!' },
Expand Down

0 comments on commit cf5c1ec

Please sign in to comment.