mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-16 04:55:11 +00:00
29 lines
590 B
JavaScript
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);
|
|
});
|
|
});
|
|
});
|