React Test Challenges Course
Use what you learned in the other courses and see if you can fix these broken tests in our set of tricky React testing challenges. If you get stuck you can always reveal some hints to guide you along the way.
Course Lessons
10 lessons to learn everything about React Test Challenges
Basic React Testing Challenges
Challenge: Where is the rendered component?
React testing challenge: Why isn't this simple test working? Surely it must be able to find the text...?
Challenge: Keyboard shortcut combinations
How to test when we are expecting the user to trigger a keyboard shortcut
Challenge: When localStorage leaks between tests
In this challenge there is a broken test, where it fails if it runs at the bottom of the test. Something is leaking...
Challenge: how can both assertions be passing?
In this challenge figure out what is wrong! Surely both assertions in both test cases cannot be passing? But somehow they are...
Selecting The Correct React Element Testing Challenges
Challenge: Split text
Find elements that have text split between different elements
Challenge: Use a RegExp to find elements
Find an element by using regex
Challenge: Screen Reader Only Text
Test components that have visually hidden text meant only for screen readers
Challenge: Select one of many elements
Test a component where users can select one item from multiple options, ensuring proper selection state and deselection of others
Async Rendering React Testing Challenges
More Challenges Coming Soon!
Stay tuned - adding more challenges very soon! Please use the feedback form to let me know how you find them