Which of the following is a correct TypeScript test case?
import { add } from "./math";
test("should add two numbers", () => {
const result: number = add(2, 3);
expect(result).toBe(5);
});
TypeScript does not support the test function.
The type of result must not be explicitly declared.
This is a correct TypeScript test case using a testing framework.
TypeScript tests must use the assert method instead of expect.
This question is part of this quiz :
Testing with TypeScript Quiz