An array that contains all the object instances that have been instantiated from this mock function using new.
For example: A mock function that has been instantiated twice would have the following mock.instances array:
const mockFn = jest.fn();
const a = new mockFn();
const b = new mockFn();
mockFn.mock.instances === a; // true
mockFn.mock.instances === b; // true
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.