Question · NestJS course · Module 7: Testing

Unit vs integration difference

The main difference between unit and integration tests is:

Answer options

  • Integration tests don't use mocks
  • Unit is faster because it uses a real database
  • There is no difference, they are synonyms
  • Unit tests a single component, integration tests the cooperation of many

You can check the correct answer by solving this task in the CodeWorlds game.