/test

Primary LanguageJavaScript

News Site Part V

High Level Objectives

  1. Add tests to your existing news site application
  2. Learn the basics of using Puppeteer

Requirements

  1. Add at least 3 unit tests to your news site application.
  • You may need to refactor your application to make it testable.
  • Organize your code into small functions that return output based on their input, but cause no side effects.
  • Bonus: Use jest's mocks to test functions that call the API without actually sending HTTP requests.
  1. Add at least 3 functional tests to your application.
  • Use puppeteer to drive a browser to test your UI.
  • Verify that a user can navigate the site by clicking links, submiting forms, etc.

Look ahead: If you really want another task, start looking into the documentation for React's Context API.

External Resources