Answers for "sinon spy function example"

0

sinon spy function example

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;
Posted by: Guest on May-29-2021

Browse Popular Code Answers by Language