Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jest simulate toggle switch react native

fireEvent(getByTestId('switch-element-id'), 'valueChange', true || false);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jest #simulate #toggle #switch #react #native
ADD COMMENT
Topic
Name
9+4 =