11import VuexTest from './components/VuexTest'
2- import { render , Simulate , wait } from '../../src'
2+ import { render , fireEvent , wait } from '../../src'
33
44const store = {
55 state : {
@@ -16,15 +16,15 @@ const store = {
1616
1717test ( 'can render with vuex with defaults' , async ( ) => {
1818 const { getByTestId, getByText } = render ( VuexTest , { store } )
19- Simulate . click ( getByText ( '+' ) )
19+ fireEvent . click ( getByText ( '+' ) )
2020 await wait ( )
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- Simulate . click ( getByText ( '-' ) )
27+ fireEvent . click ( getByText ( '-' ) )
2828 await wait ( )
2929 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '2' )
3030} )
@@ -35,10 +35,10 @@ test('can render with vuex with custom store', async () => {
3535
3636 const store = { state : { count : 1000 } }
3737 const { getByTestId, getByText } = render ( VuexTest , { store } )
38- Simulate . click ( getByText ( '+' ) )
38+ fireEvent . click ( getByText ( '+' ) )
3939 await wait ( )
4040 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '1000' )
41- Simulate . click ( getByText ( '-' ) )
41+ fireEvent . click ( getByText ( '-' ) )
4242 await wait ( )
4343 expect ( getByTestId ( 'count-value' ) . textContent ) . toBe ( '1000' )
4444
0 commit comments