Skip to content

Glossary: JavaScript Beyond the Basics

Dependency injection

Passing in what a function needs, such as the email sender, instead of importing it inside. That lets a test hand in a fake sender so no real emails go out.

Where the book teaches it

Related terms

Mock functionTest double