Testing · Senior · Question 60 of 75

Why is dependency injection helpful for testability?

Explanation

Passing a now() function or an API client as a parameter is the simplest form of DI.

Further reading

Problem with a question

Testing · Senior · question 60

Test yourself

Take the Testing · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz