UNPKG

1.07 kBJavaScriptView Raw
1"use strict";
2let mars = require('../index.js').mars;
3let chai = require('chai');
4let chaiSubset = require('chai-subset');
5let assert = chai.assert;
6chai.use(chaiSubset);
7
8describe('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