Skip to content

Capture arguments passed to method on mocked object #132

Open
@gusgorman2

Description

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 ?

I know I can use expect(statusDao.getWhere).toHaveBeenCalledWith() but this doesn't always quite do what i want

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions