📜  sinon spy 函数示例 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:17.107000             🧑  作者: Mango

代码示例1
var source = require('./source');
var sinon = require('sinon');
var expect = require('chai').expect;

sinon.stub(source, 'myFunc').returns(true);
source.myFunc();
expect(sinon).to.be.true;