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';
10
10
import { configureStore } from '@reduxjs/toolkit' ;
11
11
import rootReducer from '../app/src/redux/reducers/rootReducer' ;
12
12
import { initialState as appStateInitialState } from '../app/src/redux/reducers/slice/appStateSlice' ;
13
-
13
+ import { act } from 'react-dom/test-utils' ;
14
14
15
15
16
16
// Mock the non-serializable HTMLTypes
@@ -117,8 +117,11 @@ describe('NavBar Component', () => {
117
117
118
118
console . log ( 'After rendering NavBar' ) ;
119
119
120
- const publishButton = getByText ( 'Publish' ) ;
121
- fireEvent . click ( publishButton ) ;
120
+ await act ( async ( ) => {
121
+
122
+ const publishButton = getByText ( 'Publish' ) ;
123
+ fireEvent . click ( publishButton ) ;
124
+ } ) ;
122
125
} ) ;
123
126
124
127
it ( 'handles publish correctly with new project' , async ( ) => {
You can’t perform that action at this time.
0 commit comments