Jest · Type Alias
MockedFunction
Jest mock functions replace real implementations during tests. They record calls, arguments, constructor instances, and configured return values.
Last updated
Syntax
jest.fn(implementation?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
jest.fn()manual mockmock.callsconstructor functions