[WIP] test

This commit is contained in:
syuilo 2017-01-17 10:06:54 +09:00
parent 98e2828b65
commit 2bb5b2d53c
2 changed files with 7 additions and 3 deletions

View File

@ -2,9 +2,6 @@
* 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();
@ -35,6 +32,7 @@ describe('API', () => {
.end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
res.body.should.have.property('username').eql(account.username);
done();
});
});

6
test/index.js Normal file
View File

@ -0,0 +1,6 @@
// During the test the env variable is set to test
process.env.NODE_ENV = 'test';
// Init babel
require('babel-core/register');
require('babel-polyfill');