mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #701 from ryanxcharles/bug/remove-console-log-from-tests
remove console.log from test
This commit is contained in:
commit
2bf89d234e
|
@ -49,10 +49,13 @@ describe('WalletFactory model', function() {
|
||||||
var c2 = JSON.parse(JSON.stringify(config));
|
var c2 = JSON.parse(JSON.stringify(config));
|
||||||
c2.verbose = 1;
|
c2.verbose = 1;
|
||||||
var wf = new WalletFactory(c2, '0.0.1');
|
var wf = new WalletFactory(c2, '0.0.1');
|
||||||
|
var save_console_log = console.log;
|
||||||
|
console.log = function() {};
|
||||||
var spy = sinon.spy(console, 'log');
|
var spy = sinon.spy(console, 'log');
|
||||||
wf.log('ok');
|
wf.log('ok');
|
||||||
sinon.assert.callCount(spy, 1);
|
sinon.assert.callCount(spy, 1);
|
||||||
spy.getCall(0).args[0].should.equal('ok');
|
spy.getCall(0).args[0].should.equal('ok');
|
||||||
|
console.log = save_console_log;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue