From 1fefe5eba467de7ec52e92f3fdbf06cd88c3281c 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 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');