Question · NestJS course · Module 7: Testing

Assertions in controller tests

expect(result).toEqual(expected) checks:

Answer options

  • Whether result is the exact same object as expected
  • Whether result is not null
  • Deep comparison of object structure and values
  • Whether both objects have the same type

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