Answers for "jest called times"

0

jest called times

const mockCallback = jest.fn(x => 42 + x);
forEach([0, 1], mockCallback);

// The mock function is called twice
expect(mockCallback.mock.calls.length).toBe(2);
Posted by: Guest on September-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language