Skip to content

Commit

Permalink
[React18] Migrated test suites to accommodate changes to testing libr…
Browse files Browse the repository at this point in the history
…ary owned by fleet,kibana-cloud-security-posture
  • Loading branch information
eokoneyo committed Nov 21, 2024
1 parent 51a84eb commit 80d60a2
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
* 2.0.
*/

import { renderHook, act } from '@testing-library/react-hooks/dom';

import { waitFor } from '@testing-library/react';
import { waitFor, renderHook, act } from '@testing-library/react';

import { createPackagePolicyMock } from '../../../../../../../../common/mocks';

Expand Down Expand Up @@ -580,9 +578,9 @@ describe('useSetupTechnology', () => {
})
);

await waitFor(() => new Promise((resolve) => resolve(null)));

expect(result.current.selectedSetupTechnology).toBe(SetupTechnology.AGENT_BASED);
await waitFor(() =>
expect(result.current.selectedSetupTechnology).toBe(SetupTechnology.AGENT_BASED)
);

act(() => {
result.current.handleSetupTechnologyChange(SetupTechnology.AGENT_BASED);
Expand Down

0 comments on commit 80d60a2

Please sign in to comment.