1 | "use strict";
|
2 | let mars = require('../index.js').mars;
|
3 | let chai = require('chai');
|
4 | let chaiSubset = require('chai-subset');
|
5 | let assert = chai.assert;
|
6 | chai.use(chaiSubset);
|
7 |
|
8 | describe('Mars', function() {
|
9 | it('should return json data with date provided curiosity', function (done) {
|
10 | mars.curiosity("2017-12-03").then(function (data) {
|
11 | assert.containSubset(JSON.parse(data), {
|
12 | photos: []})
|
13 | done();
|
14 | }).catch(done);
|
15 | });
|
16 |
|
17 | it('should return json data with date provided opportunity', function (done) {
|
18 | mars.opportunity("2017-12-03").then(function (data) {
|
19 | assert.containSubset(JSON.parse(data), {
|
20 | photos: []})
|
21 | done();
|
22 | }).catch(done);
|
23 | });
|
24 |
|
25 | it('should return json data with date provided opportunity', function (done) {
|
26 | mars.spirit("2017-12-03").then(function (data) {
|
27 | assert.containSubset(JSON.parse(data), {
|
28 | photos: []})
|
29 | done();
|
30 | }).catch(done);
|
31 | });
|
32 | }); |
\ | No newline at end of file |