File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import userEvent , { UserEvent } from '@testing-library/user-event' ;
2
+ import userEvent from '@testing-library/user-event' ;
3
3
import { render , screen , waitFor } from '@testing-library/preact' ;
4
4
import { describe , it } from '@jest/globals' ;
5
5
import { MemoryRouter } from 'react-router-dom' ;
6
6
import { useContactDialog } from '~/layouts/landing/footer/flex' ;
7
7
8
+ const user = userEvent . setup ( { advanceTimers : jest . advanceTimersByTime } ) ;
9
+
8
10
function ShowContactDialog ( props : Parameters < ReturnType < typeof useContactDialog > [ 'ContactDialog' ] > [ 0 ] ) {
9
11
const { ContactDialog, open : openContactDialog } = useContactDialog ( ) ;
10
12
@@ -18,11 +20,8 @@ function ShowContactDialog(props: Parameters<ReturnType<typeof useContactDialog>
18
20
19
21
describe ( 'flex landing footer' , ( ) => {
20
22
describe ( 'contact dialog' , ( ) => {
21
- let user : UserEvent ;
22
-
23
23
beforeEach ( ( ) => {
24
24
jest . useFakeTimers ( ) ;
25
- user = userEvent . setup ( { advanceTimers : jest . advanceTimersByTime } ) ;
26
25
} ) ;
27
26
28
27
it ( 'opens and closes' , async ( ) => {
You can’t perform that action at this time.
0 commit comments