Add first batch of tests

This commit is contained in:
Petr Sloup
2016-03-09 11:26:02 +01:00
parent 7ca7fc721f
commit 77755b548b
5 changed files with 79 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
describe('Metadata', function() {
describe('/index.json', function() {
it('is json', function(done) {
supertest(app)
.get('/index.json')
.expect(200)
.expect('Content-Type', /application\/json/, done);
});
it('is non-empty array', function(done) {
supertest(app)
.get('/index.json')
.expect(function(res) {
res.body.should.be.Array();
res.body.length.should.be.greaterThan(0);
}).end(done);
});
});
});