MockPropertyContext
Since
v24.3.0
Properties
Functions
Link copied to clipboard
This function returns the number of times that the property was accessed. This function is more efficient than checking ctx.accesses.length
because ctx.accesses
is a getter that creates a copy of the internal access tracking array.
Link copied to clipboard
This function is used to change the value returned by the mocked property getter.
Link copied to clipboard
This function is used to change the behavior of an existing mock for a single invocation. Once invocation onAccess
has occurred, the mock will revert to whatever behavior it would have used had mockImplementationOnce()
not been called.
Link copied to clipboard
Resets the access history of the mocked property.