Skip to content

bahmutov/storybook-code-coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storybook code coverage

This project shows how to collect code coverage from Storybook (e.g. when using Chromatic for Visual Regresion tests) and how to create a combined report for 3 types of test:

  • visual regression tests (storybook/chromatic)
  • unit tests (jest)
  • integration tests (cypress)

You can view a report for each type of test, or view the coverage of all tests together.

yarn yarn coverage open coverage/merged/lcov-report/index.html

Combining coverage

You can also merge reports with codecov.

Known issues

  • Integration test report doesn't include full statistics for files with no coverage
  • Can't configure cypress-specific nyc settings outside of generic files (package.json/nycrc)
  • Can't currently use create-react-app 3.4.1 - facebook/create-react-app#8689

About

Storybook code coverage example and combine with integration, unit test coverage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.1%
  • HTML 12.3%
  • CSS 2.6%