/reactic-tac-toe

Just brushing up on React

Primary LanguageTypeScriptCreative Commons Attribution 4.0 InternationalCC-BY-4.0

CI Badge codecov

Run tests with prefers-reduced-motion: no-preference in slo-mo on a single browser:

 SLOWMO=true WITH_MOTION=true bunx playwright test gameplay --debug --project chromium

What I learned from this exercise

  • Playwright is easier to set up than Cypress
  • Aiming for 100% unit test code coverage makes very little sense for React projects
  • Always make sure to set dependencies in useEffect, or set dependencies as [] to make code run only once
  • Dark mode toggles are generally more trouble than they're worth
  • Getting code coverage for e2e tests is hard. I was able to get some coverage set up in the e2e-test-coverage branch but the results don't seem entirely accurate.