You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.only('Testing if successfully called API',(t)=>{nock('https://api.nasa.gov/planetary/apod').get('?date=2018-03-29&api_key=undefined').reply(200,{planet: 'Jupiter',photographer: 'Lawrence'});supertest(router).get('/api/search?2018-03-29').expect(200).end((err,res)=>{t.deepEqual(res.body,{planet: 'Jupiter',photographer: 'Lawrence'});t.end();});});
The text was updated successfully, but these errors were encountered:
@eliasCodes example of nock and supertest
The text was updated successfully, but these errors were encountered: