rescript-jest
rescript-jest copied to clipboard
Handle toHaveBeenCalled
Good to write bindings for toHaveBeenCalled, toHaveBeenCalledWith,... and other methods for mock functions.
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 :)