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
를 변경하는 방법 죄송한데?