File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { Provider } from 'react-redux';
1010import { configureStore } from '@reduxjs/toolkit' ;
1111import rootReducer from '../app/src/redux/reducers/rootReducer' ;
1212import { initialState as appStateInitialState } from '../app/src/redux/reducers/slice/appStateSlice' ;
13-
13+ import { act } from 'react-dom/test-utils' ;
1414
1515
1616// Mock the non-serializable HTMLTypes
@@ -117,8 +117,11 @@ describe('NavBar Component', () => {
117117
118118 console . log ( 'After rendering NavBar' ) ;
119119
120- const publishButton = getByText ( 'Publish' ) ;
121- fireEvent . click ( publishButton ) ;
120+ await act ( async ( ) => {
121+
122+ const publishButton = getByText ( 'Publish' ) ;
123+ fireEvent . click ( publishButton ) ;
124+ } ) ;
122125 } ) ;
123126
124127 it ( 'handles publish correctly with new project' , async ( ) => {
You can’t perform that action at this time.
0 commit comments