diff --git a/test/api.js b/test/api.js index 0d45033918..e48d885db8 100644 --- a/test/api.js +++ b/test/api.js @@ -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(); }); }); diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000000..6444fea62c --- /dev/null +++ b/test/index.js @@ -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');