by LiterallyDoge · 8y ago · 0 comments
- "This thing was null but you didn't account for this case" - "You should have a number here but something returned a string" - "You have made an invisible typo in a property name" - "You have not handled all possible values in this function" - "You accessed some data internal to a class that wasn't meant to be changed"
Basically my experience is that is substantially cuts down on the number of stupid bugs that end up in my code. The code completion is also fantastic!
https://github.com/Dean177/jest-to-match-shape-of
I had the same issue, types don't mean anything if they don't align with the data that your app is consuming. My solution was that matcher combined with some integration tests.