Node.js Developer — Hard
Key points
- Dependency injection involves passing dependencies as arguments
- This allows for easy replacement with mocks or stubs in tests
- Modifying production code is not necessary for testing with dependency injection
Ready to go further?
Related questions
