File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import NumberDisplay from './components/NumberDisplay.vue'
77// That said, if you'd prefer to update the props of a rendered component, this
88// function can be used to update props of the rendered component.
99test ( 'calling render with the same component but different props does not remount' , async ( ) => {
10- const { getByTestId, updateProps } = render ( NumberDisplay , {
10+ const { getByTestId, setProps } = render ( NumberDisplay , {
1111 props : { number : 1 } ,
1212 } )
1313
1414 expect ( getByTestId ( 'number-display' ) ) . toHaveTextContent ( '1' )
1515
16- await updateProps ( { number : 2 } )
16+ await setProps ( { number : 2 } )
1717
1818 expect ( getByTestId ( 'number-display' ) ) . toHaveTextContent ( '2' )
1919
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ function render(
8888 wrapper . setProps ( _ )
8989 return waitFor ( ( ) => { } )
9090 } ,
91+ setProps : props => wrapper . setProps ( props ) ,
9192 ...getQueriesForElement ( baseElement ) ,
9293 }
9394}
You can’t perform that action at this time.
0 commit comments