Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to test if an element has a class in testing library

expect(getByTestId('element_data_test').classList.contains('className')).toBe(true);
 
PREVIOUS NEXT
Tagged: #test #element #class #testing #library
ADD COMMENT
Topic
Name
2+5 =