Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to Update the Props of a Rendered Component in vue Testing Library

const { getByTestId, rerender } = render(Component, {
	props: {
		componentProp: 'some text',
	},
});

// updating props
await rerender({
	componentProp: 'another text',
});
 
PREVIOUS NEXT
Tagged: #How #Update #Props #Rendered #Component #vue #Testing #Library
ADD COMMENT
Topic
Name
4+4 =