The process of replacing a module with generic and mostly empty object, called a mock.
Advantages:
Advantages:
- Isolates our code from its dependencies.
- Write tests with no knowledge of dependencies.
- No need to change tests after change of dependencies.
- Reduces false positives.
- Tests will be less fragile.
- Easier for other developers to understand.
No comments:
Post a Comment