Question · NestJS course · Module 7: Testing
Purpose of jest.fn()
jest.fn() in tests creates:
Answer options
- A new NestJS module
- A mock function tracked by Jest
- A new class instance
- A test file with .spec.ts extension
You can check the correct answer by solving this task in the CodeWorlds game.