For this exercise, we would like you to make and test a weather app using React, React Testing Library, and the open weather map api.
- The app should have a form that takes in a location (city name or zip code, your choice)
- When the form is submitted, the app should display the current weather for the location
- When the form is submitted, the app should display a 5 day forcast for the location
You should use the open weather map api for your weather data.
Examples of how to make requests for current weather and a 5 day forecast can be found in their docs
The API is free, but requires an api key.
- To get an API, you need to register an account with the api.
For practice, you should test your app as well.
- Write unit tests for all sub components. These unit tests should:
- verify that the component renders the UI we expect when passed props
- verify that any methods the component receives as props are called at the correct times
- Write integration tests that go over major user stories. These tests should:
- Verify that the user can fill out the form, submit it, and see the current weather on the DOM
- Verify that the user can fill out the form, submit it, and see a 5 day forecast appear on the DOM