Stub npmlog in integration tests
This commit is contained in:
parent
e9251d5203
commit
d8039ea976
@ -5,6 +5,7 @@ const Mongo = require('../../src/dao/mongo');
|
|||||||
const nodemailer = require('nodemailer');
|
const nodemailer = require('nodemailer');
|
||||||
const config = require('config');
|
const config = require('config');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const log = require('npmlog');
|
||||||
|
|
||||||
describe('Koa App (HTTP Server) Integration Tests', function() {
|
describe('Koa App (HTTP Server) Integration Tests', function() {
|
||||||
this.timeout(20000);
|
this.timeout(20000);
|
||||||
@ -35,6 +36,8 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
|
|||||||
use() {}
|
use() {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
sinon.stub(log);
|
||||||
|
|
||||||
global.testing = true;
|
global.testing = true;
|
||||||
const init = require('../../src/app');
|
const init = require('../../src/app');
|
||||||
app = yield init();
|
app = yield init();
|
||||||
@ -47,6 +50,7 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
after(function *() {
|
after(function *() {
|
||||||
|
sinon.restore(log);
|
||||||
nodemailer.createTransport.restore();
|
nodemailer.createTransport.restore();
|
||||||
yield mongo.clear(DB_TYPE_PUB_KEY);
|
yield mongo.clear(DB_TYPE_PUB_KEY);
|
||||||
yield mongo.clear(DB_TYPE_USER_ID);
|
yield mongo.clear(DB_TYPE_USER_ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user