cfpb / design-system-react

A React/Storybook implementation of CFPB's Design System
https://cfpb.github.io/design-system-react/
MIT License
6 stars 4 forks source link

Improve focus of test coverage reporting #291

Closed meissadia closed 7 months ago

meissadia commented 9 months ago

Note: This PR builds upon https://github.com/cfpb/design-system-react/pull/206, so will wait until those changes are merged before moving forward with revew.

Closes #290

Tests that imported components from the main DSR export (src/index.ts) caused the coverage report to include info on all of the components in DSR.

This PR imports components directly from their implementation files, allowing devs to focus on the test coverage of only the elements involved in the tests being run.

Changes

How to test this PR

  1. yarn test divider
  2. Observe that no components, other than Divider, are reported on
  3. yarn test
  4. Observe that the files included in the coverage report are restricted to elements from DSR
netlify[bot] commented 9 months ago

Deploy Preview for cfpb-design-system-react ready!

Name Link
Latest commit 40435c08cf6106b7d4015aee8536e8b4b7e6e07e
Latest deploy log https://app.netlify.com/sites/cfpb-design-system-react/deploys/65f36f917b22a60008d52a8f
Deploy Preview https://deploy-preview-291--cfpb-design-system-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

meissadia commented 9 months ago

Merge conflicts have been resolved. Ready for review.