Quiz Yourself on Mocking

This quiz will test what you have learned in this chapter.

We'll cover the following...
1

(Select all that apply.) What expectations pass after the following code is executed?

const mock = jest.fn();
mock(1);
mock(2);
A)
expect(mock).toBeCalled();
B)
expect(mock).toBeCalledTimes(1);
C)
expect(mock).toBeCalledTimes(2);
D)
expect(mock).toBeCalledWith(1);
E)
expect(mock).toBeCalledWith(2);
Question 1 of 80 attempted
Access this course and 1400+ top-rated courses and projects.