loading...

re: Testing a simple React component VIEW POST

FULL DISCUSSION
 

This is great! One tip: Try to avoid data-testid and *ByTestId queries. Sometimes you can't really avoid it very well (especially for the checked-items <p> tag), but often you can: testing-library.com/docs/guide-whi...

For example, instead of getByTestId('items-list') you could do: getByRole('list') and get rid of the data-testid :)

Thanks for writing this!

 

Thank you! I shall update that in the post.

code of conduct - report abuse