A lead developer is creating tests for a Lightning web component. The component re-renders when a property called bypassSelection changes its value. What should the developer use to test that the component re-renders successfully when the property changes?
A. Window.setInterval()
B. Window.setState()
C. dispatchEvent (new CustomEvent(‘bypassSelection’))
D. Promise.resolve()
Suggest answer: C
Reference:
No comments:
Please share to make the community better.