Skip to main content

method MockFunctionContext.prototype.callCount

#MockFunctionContext.prototype.callCount(): number

This function returns the number of times that this mock has been invoked. This function is more efficient than checking ctx.calls.length because ctx.calls is a getter that creates a copy of the internal call tracking array.

Return Type #

number

The number of times that this mock has been invoked.

Did you find what you needed?

Privacy policy