Put in order · JavaScript and React course · Module 13: Testing React
Stages of testing a custom hook
Arrange the stages of testing a custom hook in the correct order:
Items to put in order
- Call action in act(() => { ... })
- Check the initial state in result.current
- Call renderHook(() => useMyHook())
- Check the updated state
You can check the correct answer by solving this task in the CodeWorlds game.