What does the following Jest test case do?
test('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
Logs the result of the addition
Throws an error if the result is not 3
Mocks the addition function
Asserts that the sum of 1 and 2 equals 3
This question is part of this quiz :
JavaScript Testing And Optimization