Your time is valuable
Lens reduces the time spent unit testing by over 50%. How many hours have you spent writing and testing code? Imagine what you could accomplish if half your time were returned to you.
You’re at risk
What about side effects? Assertion-based frameworks only check the values in your assertions. If it wasn’t asserted, it didn’t get checked.
At any time, you could be bitten by:
- a malicious system call buried in a merge request
- a forgotten debugging statement that will break your AJAX
- a suppressed warning that could have revealed a big issue
- filesystem calls that assume your development area resembles production
- a new pass-by-reference behavior that will overwrite your variables
Assertion-based frameworks won’t protect you and they won’t check every side effect. Lens will.
You want 100%
In almost every codebase, there is some code that goes untested. Usually, it’s the controller or the data-access layer. Even with partial mocks, and considerable effort, there is some code that escapes testing.
With most unit-testing frameworks, the best you can hope for is almost or good enough. With Lens, you can get 100%.