📜  Mocha Chai expect.to.throw 错误 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:33.534000             🧑  作者: Mango

代码示例1
You have to pass a function to stub. Like this:
     const findOneAndUpdateStub = sinon
       .stub(Client, "findOneAndUpdate")
       .throws(new Error(""));