Skip to content

Tag: unit-testing

Unit test with react hook fails

I don’t understand the result I get on this unit test. I expect the second check for textField.valid to be true and instead it returns false. Below is part of the component I’m testing against: … Below is the test I’m running: The output of console.log(wrapper.debug()) is the following…