Concept: Isolation in Unit Tests
Question
What does 'isolation' mean in unit testing?
Hint
Think about what the function depends on.
Explanation
Isolation means the unit under test is separated from its external dependencies (database, network, other modules). This is typically achieved through mocking or dependency injection. Isolation ensures that a unit test only fails because of a bug in the unit itself, not because an external dependency is unavailable or broken.
Related Resources
Related Lessons
- Unit Testing
Writing effective unit tests.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.