weather_test.js
574 Bytes
import * as mocha from 'mocha'
import * as weater from '../weather.js'
mocha.describe('weather', () => {
mocha.it('get tomorrow weather', async () => {
weater.get_weather_forecast(new Date())
.then(it => console.log(it))
.catch(it => console.log(it))
})
mocha.it('get 7 days later weather', async () => {
const date = new Date()
date.setDate(new Date().getDate() + 7)
weater.get_weather_forecast(date)
.then(it => console.log(it))
.catch(it => console.log(it))
})
});