Manuel Araoz
11 years ago
6 changed files with 187 additions and 137 deletions
@ -0,0 +1,14 @@ |
|||
'use strict'; |
|||
|
|||
var backup = console.log; |
|||
var nop = function() {}; |
|||
var mute = function() { |
|||
console.log = nop; |
|||
}; |
|||
|
|||
var unmute = function() { |
|||
console.log = backup; |
|||
}; |
|||
|
|||
module.exports.mute = mute; |
|||
module.exports.unmute = unmute; |
@ -0,0 +1,24 @@ |
|||
'use strict'; |
|||
|
|||
var chai = chai || require('chai'); |
|||
var should = chai.should(); |
|||
var mute = require('./mute').mute; |
|||
var unmute = require('./mute').unmute; |
|||
|
|||
var examples = [ |
|||
'Address', |
|||
'PeerManager', |
|||
'Rpc', |
|||
'SendTx', |
|||
]; |
|||
|
|||
describe('Examples run', function() { |
|||
before(mute); |
|||
after(unmute); |
|||
examples.forEach(function(example) { |
|||
it('valid '+example, function() { |
|||
var ex = require('../examples/'+example); |
|||
ex.run.should.not.throw(); |
|||
}); |
|||
}); |
|||
}); |
Loading…
Reference in new issue