summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 10:39:28 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 10:39:28 +0900
commita382f62071f652237bd711af3f0e2a9758dea90a (patch)
tree285dcf5419b38af6c67f5fa254a1e51833db3543
parent:v: (diff)
downloadmisskey-a382f62071f652237bd711af3f0e2a9758dea90a.tar.gz
misskey-a382f62071f652237bd711af3f0e2a9758dea90a.tar.bz2
misskey-a382f62071f652237bd711af3f0e2a9758dea90a.zip
[WIP] test
Diffstat (limited to '')
-rw-r--r--test/api.js7
-rw-r--r--test/index.js3
2 files changed, 7 insertions, 3 deletions
diff --git a/test/api.js b/test/api.js
index 32052fe5a8..e9ec076ee0 100644
--- a/test/api.js
+++ b/test/api.js
@@ -2,6 +2,9 @@
* API TESTS
*/
+// During the test the env variable is set to test
+process.env.NODE_ENV = 'test';
+
const chai = require('chai');
const chaiHttp = require('chai-http');
const should = chai.should();
@@ -9,8 +12,12 @@ const should = chai.should();
chai.use(chaiHttp);
const server = require('../built/api/server');
+const db = require('../built/db/mongodb').default;
describe('API', () => {
+ // Reset database
+ db.get('users').drop();
+
it('greet server', done => {
chai.request(server)
.get('/')
diff --git a/test/index.js b/test/index.js
index 6444fea62c..46e98f4ec1 100644
--- a/test/index.js
+++ b/test/index.js
@@ -1,6 +1,3 @@
-// During the test the env variable is set to test
-process.env.NODE_ENV = 'test';
-
// Init babel
require('babel-core/register');
require('babel-polyfill');