Open
Description
My error: (...).to.have.been.alwaysCalledWith is not a function
My code
it("fires props.togglePurchasable with id when clicked", function() {
const props = cloneDeep(baseProps);
const wrapper = shallow(<StoreFrontPurchasable {...props} />);
wrapper.find("button").simulate("click");
wrapper.find("button").simulate("click");
wrapper.find("button").simulate("click");
expect(props.togglePurchasable.callCount).to.equal(3);
expect(props.togglePurchasable).to.have.been.alwaysCalledWithExactly(props.purchasable.id);
});
My versions: chai: 3.5.0 sinon:7.2.2 sinon-chai:3.3.0
I get the same result when I try to use alwaysCalledWith
, but I don't have any problem using calledWith
or calledWithExactly
(except of course that they're not the assertion I need).
I noticed that alwaysCalledWith
and alwaysCalledWithExactly
are missing from the bottom of lib/sinon-chai.js, is this a coincidence? alwaysCalledWith
and alwaysCalledWithExactly
are listed in the README, so I assume they should be available.
Metadata
Metadata
Assignees
Labels
No labels