Cleanup app/init/koa-middlewares
This commit is contained in:
@@ -25,6 +25,8 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
|
||||
before(async () => {
|
||||
sandbox = sinon.sandbox.create();
|
||||
|
||||
sandbox.stub(log);
|
||||
|
||||
publicKeyArmored = fs.readFileSync(`${__dirname}/../key1.asc`, 'utf8');
|
||||
mongo = new Mongo();
|
||||
await mongo.init(config.mongo);
|
||||
@@ -39,9 +41,6 @@ describe('Koa App (HTTP Server) Integration Tests', function() {
|
||||
use() {}
|
||||
});
|
||||
|
||||
sandbox.stub(log);
|
||||
|
||||
global.testing = true;
|
||||
const init = require('../../src/app');
|
||||
app = await init();
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const log = require('npmlog');
|
||||
const config = require('config');
|
||||
const Mongo = require('../../src/dao/mongo');
|
||||
|
||||
@@ -7,9 +8,13 @@ describe('Mongo Integration Tests', function() {
|
||||
this.timeout(20000);
|
||||
|
||||
const DB_TYPE = 'apple';
|
||||
let sandbox;
|
||||
let mongo;
|
||||
|
||||
before(async () => {
|
||||
sandbox = sinon.sandbox.create();
|
||||
sandbox.stub(log);
|
||||
|
||||
mongo = new Mongo();
|
||||
await mongo.init(config.mongo);
|
||||
});
|
||||
@@ -19,6 +24,7 @@ describe('Mongo Integration Tests', function() {
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
sandbox.restore();
|
||||
await mongo.clear(DB_TYPE);
|
||||
await mongo.disconnect();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user