May 2019
Intermediate to advanced
496 pages
10h 38m
English
Our CustomerForm component is now in the right shape we want in. If you run all tests now using npm test, you'll see that all your tests are passing.
But did you notice that we have, in fact, broken our application? Go ahead and manually test it: what happens when you try to save your customer? The customer saves, but the screen doesn't change.
By removing the onSave prop, we changed the public interface of the CustomerForm component. Unfortunately, no one told App, which is still expecting it to be notified via onSave.
This is a serious problem. Clearly, our tests have not given us 100% protection. What can we do about this?
You might be able to guess my answer already, but it is not to set propTypes
Read now
Unlock full access