Question · NestJS course · Module 7: Testing

Test code review process

Which of the following principles is crucial when writing unit tests?

Answer options

  • Tests should depend on each other and share state
  • Tests should be independent from each other and isolated
  • Tests should have the shortest possible names (1-2 characters)
  • Tests should only test the happy path, without edge cases

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