From 2bb5b2d53cfafc276d31d112b1ae32462755b521 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 10:06:54 +0900 Subject: [PATCH] [WIP] test --- test/api.js | 4 +--- test/index.js | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 test/index.js diff --git a/test/api.js b/test/api.js index 0d4503391..e48d885db 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 000000000..6444fea62 --- /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');