weather_test.js 571 Bytes
const mocha = require('mocha')
const weater = require('../weather')

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))
    })
});