📅  最后修改于: 2022-03-11 15:01:20.837000             🧑  作者: Mango
Normally this happens because you did not stub Populate.
Example: (in this example i added select , lean and exec too) pay attention to
the order in your function.
it("Expect to return an success object", async () => {
findStub.returns({
populate: sandbox.stub().returns({
select: sandbox.stub().returns({
lean: sandbox.stub().returns({
exec: () => fixture.Test,
}),
}),
}),
});