today/lib/weather.spec.js

13 lines
368 B
JavaScript
Raw Normal View History

2017-10-26 09:46:54 +00:00
const weather = require('./weather.js');
test('Test weather', () => {
return weather.newDoGetWeather()
.then((d) => {
expect(d.data.latitude).toEqual(55.95);
expect(d.data.longitude).toEqual(-4.566667);
}).catch((e) => {
console.error(e);
expect(e).toBeNull();
});
done();
});