0
でSinon /モカを持つ変数を模擬するためにどのようにこれは私のコードですNode.jsの
var sinon = require('sinon');
var start_end = require('./start_end');
describe("start_end", function(){
before(function() {
cb_spy = sinon.spy();
});
afterEach(function() {
cb_spy.reset();
});
it("start_pool()", function(done){
// how to make timer variable < 1, so that if(timer < 1) will meet
start_end.start_pool(cb_spy);
sinon.assert.calledWith(cb_spy, null, "hello world");
});
});
関数内の変数timer
とglb_obj
を変更する方法sinonを使って?