📅  最后修改于: 2022-03-11 15:04:33.534000             🧑  作者: Mango
You have to pass a function to stub. Like this:
const findOneAndUpdateStub = sinon
.stub(Client, "findOneAndUpdate")
.throws(new Error(""));