11import VuexTest from './components/VuexTest'
2- import { render , fireEvent , wait } from '../../src'
2+ import { render , fireEvent } from '../../src'
33
44const store = {
55 state : {
@@ -16,16 +16,16 @@ const store = {
1616
1717test ( 'can render with vuex with defaults' , async ( ) => {
1818 const { getByTestId, getByText } = render ( VuexTest , { store } )
19- fireEvent . click ( getByText ( '+' ) )
20- await wait ( )
19+ await fireEvent . click ( getByText ( '+' ) )
20+
2121 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '1' )
2222} )
2323
2424test ( 'can render with vuex with custom initial state' , async ( ) => {
2525 store . state . count = 3
2626 const { getByTestId, getByText } = render ( VuexTest , { store } )
27- fireEvent . click ( getByText ( '-' ) )
28- await wait ( )
27+ await fireEvent . click ( getByText ( '-' ) )
28+
2929 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '2' )
3030} )
3131
@@ -35,11 +35,11 @@ test('can render with vuex with custom store', async () => {
3535
3636 const store = { state : { count : 1000 } }
3737 const { getByTestId, getByText } = render ( VuexTest , { store } )
38- fireEvent . click ( getByText ( '+' ) )
39- await wait ( )
38+
39+ await fireEvent . click ( getByText ( '+' ) )
4040 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '1000' )
41- fireEvent . click ( getByText ( '-' ) )
42- await wait ( )
41+
42+ await fireEvent . click ( getByText ( '-' ) )
4343 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '1000' )
4444
4545 expect ( console . error ) . toHaveBeenCalled ( )
0 commit comments