You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, this is causing issues with chai-spies. For example, this passes fine:
letspies=require("chai-spies");letfs=require("chai-fs");letchai=require("chai");chai.use(fs).use(spies);let{ spy, expect }=chai;it("should still let me use chai-spies' .with() assertions",async()=>{letfn=spy((arg)=>arg+1);letx=fn(2);expect(x).to.equal(3);expect(fn).to.have.been.called.once;expect(fn).to.have.been.called.with(2);});
But this fails:
letspies=require("chai-spies");letfs=require("chai-fs");letchai=require("chai");chai.use(spies).use(fs);// <--- the only change is the order on this linelet{ spy, expect }=chai;it("should still let me use chai-spies' .with() assertions",async()=>{letfn=spy((arg)=>arg+1);letx=fn(2);expect(x).to.equal(3);expect(fn).to.have.been.called.once;expect(fn).to.have.been.called.with(2);});
Output:
1) should still let me use chai-spies' .with() assertions:
TypeError: expect(...).to.have.been.called.with is not a function
at Context.it (spec.js:18:37)
The text was updated successfully, but these errors were encountered:
In my case, this is causing issues with
chai-spies
. For example, this passes fine:But this fails:
Output:
The text was updated successfully, but these errors were encountered: