fac-15 / weatherTunes

weatherTunes. Tunes to match the weather
1 stars 1 forks source link

Testing #17

Open Oliversw opened 6 years ago

Oliversw commented 6 years ago

You have some tests, amazing! That's more than we managed 😅

Still, I ran npm test and wasn't able to get them to run properly, so wanted to point that out!

martingaston commented 6 years ago

Mocking API calls is real tricky! It's awesome that you've given it some consideration.

I would say you don't have to try and test the actual implementation of the API - that's the job of whoever is making the API. But the interesting things to test are what your app does based on conditions - or what data is being fed to it, basically.

There's a module called nock that does this that's pretty cool, and Jest has a big section in its documentation about putting mocks together as well. I think it's probably a bit more of homework reading than something to look into today - the takeaway here is that you've started thinking about it and that's great :+1:

HStewart23 commented 6 years ago

Thanks for the info! Will have a look at nock 😸