Loading
Current section: Modules 4 exercises
lesson

Recap of Modules

Loading lesson

Transcript

00:00 What can I say? Great job. Now you know more about mocking modules, but also some alternatives to it. Of course, you should always strive towards mocking specific values or behaviors and tasks. Even if you can't, you can rely on techniques like dependency injection and using fakes to substitute for module mocking.

00:17 When nothing else works, you can mock a module by using the built-in VTest APIs to do that in a reliable and type-safe way. Remember that mocking a module is a great power, so it comes with great responsibility.