/c8-sub-directory

A minimal reproduceable example for c8 not working from a sub-directory.

Primary LanguageJavaScript

Overview

  • When running c8 from a sub-directory to test code in a src folder one directory up, code coverage doesn't work.
  • Issue filed in the c8 repo: bcoe/c8#527

Steps to reproduce

  1. Download this repo
  2. npm install
  3. npm run test
  4. See that 1 test passes and 100% coverage. Yay! 🎉
  5. cd sub-directory
  6. npm install
  7. npm run test
  8. See that 1 test passes and 0% coverage. 😢

Video

video.mov