Skip to content

Instantly share code, notes, and snippets.

@alicerocheman
Last active October 13, 2022 12:15
Show Gist options
  • Save alicerocheman/17032c7f3c379f88fa25fc8ef94c8b43 to your computer and use it in GitHub Desktop.
Save alicerocheman/17032c7f3c379f88fa25fc8ef94c8b43 to your computer and use it in GitHub Desktop.
collect jest test coverage from specific file or folder
# File
yarn test path/to/file.test --coverage --collectCoverageFrom=path/to/file.ext
# Folder
yarn test path/to/folder --coverage --collectCoverageFrom='["path/to/folder/**/*.ext"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment