From 35c2b0d2c8605798ac4118fb6e73821d62045a9b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 5 Mar 2017 12:12:19 +0900 Subject: [PATCH] [Test] fix --- test/api.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/api.js b/test/api.js index 5fdae8ac6..ef20351d0 100644 --- a/test/api.js +++ b/test/api.js @@ -20,13 +20,12 @@ _chai.use(chaiHttp); const server = require('../built/api/server'); const db = require('../built/db/mongodb').default; -const async = fn => async (done) => { - try { - await fn(); +const async = fn => (done) => { + fn().then(() => { done(); - } catch (err) { + }, err => { done(err); - } + }); }; const request = (endpoint, params, me) => new Promise((ok, ng) => {