React: Test select options list (ie, test ordering)January 20, 2020 at 11:44pm
What are patterns that are available in react-testing-library to test the options list of a select element itself? When I search for solutions, I often see people running into (solvable) challenges with interacting with a select element. However, there is very little about testing the select list itself.
Right now, I'm considering breaking out logic that sorts the select options list into its own little function and writing a test just for that function. This helps remove React and and the DOM from the equation. However, I want to see first if there are any existing patterns for this kind of problem.
January 21, 2020 at 2:02am