How to stub function that has Exegesis.CreateController?
Actual function:
export const permanentlyFailed = Exegesis.CreateController(async (context: ExegesisContext) => {}
Stubbing Test:
const deliveryGetDeliveryRateStub = sandbox.stub(Delivery, "getDeliveryRates").withArgs(sinon.match.any).callsFake(() => {
return "whatever"
})
expect(deliveryGetDeliveryRateStub.called).to.be.true