myFunc(); expect(sinon).to.be.true; ... “sinon spy function example” Code Answer. sinon spy function example ... sinon.stub(source, 'myFunc').returns(true);.
確定! 回上一頁