Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle toHaveBeenCalled #70

Open
Qziem opened this issue May 15, 2020 · 1 comment
Open

Handle toHaveBeenCalled #70

Qziem opened this issue May 15, 2020 · 1 comment

Comments

@Qziem
Copy link
Contributor

Qziem commented May 15, 2020

Good to write bindings for toHaveBeenCalled, toHaveBeenCalledWith,... and other methods for mock functions.

@DZakh
Copy link

DZakh commented May 23, 2021

You can reimplement toHaveBeenCalled with something like this:

let mockFoo = Jest.JestJs.fn(() => ())

expect(mockFoo->Jest.MockJs.calls->Js.Array2.length)->JExp.not_->JExp.toBe(0, _)

But, yeah, it would be great to have more bindings out of the box :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants