summaryrefslogtreecommitdiff
path: root/test/api.js
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-05 12:12:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-05 12:12:19 +0900
commit95a481fcc486675937414e903325d9592be67e15 (patch)
treeb2340f87c22a308634a7b468b8a7e6e836805e6e /test/api.js
parentfix (diff)
downloadmisskey-95a481fcc486675937414e903325d9592be67e15.tar.gz
misskey-95a481fcc486675937414e903325d9592be67e15.tar.bz2
misskey-95a481fcc486675937414e903325d9592be67e15.zip
[Test] fix
Diffstat (limited to 'test/api.js')
-rw-r--r--test/api.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/api.js b/test/api.js
index 5fdae8ac6c..ef20351d09 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) => {