Files
dss.web/server/api/thing/thing.integration.js
2018-10-26 21:23:25 +01:00

29 lines
590 B
JavaScript

'use strict';
var app = require('../..');
import request from 'supertest';
describe('Thing API:', function() {
describe('GET /api/things', function() {
var things;
beforeEach(function(done) {
request(app)
.get('/api/things')
.expect(200)
.expect('Content-Type', /json/)
.end((err, res) => {
if(err) {
return done(err);
}
things = res.body;
done();
});
});
it('should respond with JSON array', function() {
expect(things).to.be.instanceOf(Array);
});
});
});