[Test] fix

This commit is contained in:
syuilo 2017-03-05 12:12:19 +09:00
parent 034c7c083a
commit 95a481fcc4
1 changed files with 4 additions and 5 deletions

View File

@ -20,13 +20,12 @@ _chai.use(chaiHttp);
const server = require('../built/api/server'); const server = require('../built/api/server');
const db = require('../built/db/mongodb').default; const db = require('../built/db/mongodb').default;
const async = fn => async (done) => { const async = fn => (done) => {
try { fn().then(() => {
await fn();
done(); done();
} catch (err) { }, err => {
done(err); done(err);
} });
}; };
const request = (endpoint, params, me) => new Promise((ok, ng) => { const request = (endpoint, params, me) => new Promise((ok, ng) => {