Skip to content

Instantly share code, notes, and snippets.

@brunoti
Last active April 4, 2021 22:29
Show Gist options
  • Save brunoti/552b93ea5eab8298a8ff543ed5acea08 to your computer and use it in GitHub Desktop.
Save brunoti/552b93ea5eab8298a8ff543ed5acea08 to your computer and use it in GitHub Desktop.
expect values #javascript #tests
expect(fn)
.toHaveBeenCalledWith(expect.anything())
.toHaveBeenCalledWith(expect.any(constructor))
.toHaveBeenCalledWith(expect.arrayContaining([ values ]))
.toHaveBeenCalledWith(expect.objectContaining({ props }))
.toHaveBeenCalledWith(expect.stringContaining(string))
.toHaveBeenCalledWith(expect.stringMatching(regexp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment