Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to assert element attributes in testing library

expect(getByTestId('labelTestId').getAttribute('for')).toEqual('inputName');
 
PREVIOUS NEXT
Tagged: #assert #element #attributes #testing #library
ADD COMMENT
Topic
Name
9+8 =