How to know if a test sucks? You changed something that wouldn’t be observable to the user of your app/library, but the test broke and you had to fix the test. — Dan Abramov
Test behavior, not implementation details!
Don’t test the volatile things like component state (React/Angular/Vue).
Every time when property “email” change, your test will fail!
We are testing that when we change the input, its value will be set correctly.
This will do the trick. We are not depending on the component state anymore.