Which Jest matcher should you use to verify that a NestJS service method throws a specific exception type?
-
A
expect(fn).toThrow(NotFoundException)
-
B
expect(fn).toEqual(NotFoundException)
-
C
expect(fn).toReject(NotFoundException)
-
D
expect(fn).toBe(NotFoundException)