Open gusgorman2 opened 2 months ago
Hi,
Is there any way to capture arguments passed to a method on a mocked object.
For example, if we have:
export abstract class StatusDao { abstract getWhere(codes: string[]): Promise<Status> }
and then:
const statusDao: MockProxy<StatusDao> = mock<StatusDao>()
would there any way to capture any arguments passed to getWhere ?
getWhere
I know I can use expect(statusDao.getWhere).toHaveBeenCalledWith() but this doesn't always quite do what i want
expect(statusDao.getWhere).toHaveBeenCalledWith()
Hi,
Is there any way to capture arguments passed to a method on a mocked object.
For example, if we have:
and then:
const statusDao: MockProxy<StatusDao> = mock<StatusDao>()
would there any way to capture any arguments passed to
getWhere
?I know I can use
expect(statusDao.getWhere).toHaveBeenCalledWith()
but this doesn't always quite do what i want