dzcode.io icon indicating copy to clipboard operation
dzcode.io copied to clipboard

Improve unit/integration tests coverage for web code

Open souhaib-benbouzid opened this issue 3 years ago • 0 comments

Description

if you:

  • go to ./web folder
  • then run yarn test:cov:watch inside it
  • then open ./web/coverage/lcov-report/index.html file in your browser

you will see that some directories are marked as red, which means test coverage is below 80%. you can also see the same results in codecov.io

In this task we will make sure that all dirs are marked green ✅.

Check List

Integration tests for pages:

  1. [ ] add integration test for ./web/src/apps/main/pages/landing.
  2. [x] add integration test for ./web/src/apps/main/pages/faq. (de4ae322f9c93bb08e69413bf2339d9af540e669)
  3. [ ] add integration test for ./web/src/apps/main/pages/not-found.
  4. [ ] add integration test for ./web/src/apps/main/pages/projects.
  5. [ ] add integration test for ./web/src/apps/main/pages/articles.
  6. [ ] add integration test for ./web/src/apps/main/pages/learn.

Unit tests for components:

  1. [ ] add unit test for ./web/src/components/link-v2.
  2. [ ] add unit test for ./web/src/components/loading.
  3. [ ] add unit test for ./web/src/apps/main/components/authors.
  4. [ ] add unit test for ./web/src/apps/main/components/card.
  5. [ ] add unit test for ./web/src/apps/main/components/contributors.
  6. [x] add unit test for ./web/src/apps/main/components/footer. (6fec1481158bd9ff16cfa48d43c27f9c2c94fa99)
  7. [ ] add unit test for ./web/src/apps/main/components/markdown.
  8. [ ] add unit test for ./web/src/apps/main/components/navbar.
  9. [ ] add unit test for ./web/src/apps/main/components/sidebar.
  10. [ ] add unit test for ./web/src/apps/main/components/speed.
  11. [ ] add unit test for ./web/src/apps/main/components/theme.

Additional Comments

Please create new PR for each task.

Also, it would be great for transparency if you comment below which task you want to take up.

souhaib-benbouzid avatar Apr 18 '21 11:04 souhaib-benbouzid