File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
x-pack/plugins/apm/public/components/app/Settings/ApmIndices Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44 * you may not use this file except in compliance with the Elastic License.
55 */
66
7- import { render , wait } from '@testing-library/react' ;
7+ import { render } from '@testing-library/react' ;
88import React from 'react' ;
99import { ApmIndices } from '.' ;
1010import * as hooks from '../../../../hooks/useFetcher' ;
1111import { MockApmPluginContextWrapper } from '../../../../context/ApmPluginContext/MockApmPluginContext' ;
1212
1313describe ( 'ApmIndices' , ( ) => {
14- it ( 'should not get stuck in infinite loop' , async ( ) => {
15- spyOn ( hooks , 'useFetcher' ) . and . returnValue ( {
14+ it ( 'should not get stuck in infinite loop' , ( ) => {
15+ const spy = spyOn ( hooks , 'useFetcher' ) . and . returnValue ( {
1616 data : undefined ,
1717 status : 'loading'
1818 } ) ;
@@ -30,6 +30,6 @@ describe('ApmIndices', () => {
3030 </h2>
3131 ` ) ;
3232
33- await wait ( ) ;
33+ expect ( spy ) . toHaveBeenCalledTimes ( 2 ) ;
3434 } ) ;
3535} ) ;
You can’t perform that action at this time.
0 commit comments