summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-17 10:06:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-17 10:06:54 +0900
commit1fefe5eba467de7ec52e92f3fdbf06cd88c3281c (patch)
tree7a87b0068aff251c92ad3c4b36a07e12eab11077
parentFix travis (diff)
downloadsharkey-1fefe5eba467de7ec52e92f3fdbf06cd88c3281c.tar.gz
sharkey-1fefe5eba467de7ec52e92f3fdbf06cd88c3281c.tar.bz2
sharkey-1fefe5eba467de7ec52e92f3fdbf06cd88c3281c.zip
[WIP] test
-rw-r--r--test/api.js4
-rw-r--r--test/index.js6
2 files changed, 7 insertions, 3 deletions
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');