forked from KevinFasusi/supplychainpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-reports-compiled.js
31 lines (26 loc) · 1.17 KB
/
test-reports-compiled.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Created by kevin on 28/05/16.
*/
var expect = require('../node_modules/chai/chai.js').expect;
var supertest = require('../node_modules/supertest/index');
var api = supertest('http://localhost:5000');
describe('Endpoints', function () {
describe('sku_detail', function () {
it('should return a response of 200', function (done) {
api.get('/reporting/api/v1.0/sku_detail').set('accept', 'application/json').expect(200, done);
});
});
describe('sku_detail', function () {
it('should return a response of 200', function (done) {
api.get('/reporting/api/v1.0/sku_detail').set('accept', 'application/json').expect(200).end(function (err, res) {
//console.log(res.body.json_list[0]);
expect(res.body.json_list[0]).to.have.property("id");
expect(res.body.json_list[0].average_orders).to.not.equal(null);
expect(res.body.json_list[0]).to.have.property("classification");
expect(res.body.json_list[0].classification).to.not.equal(null);
done();
});
});
});
});
//# sourceMappingURL=test-reports-compiled.js.map