covr icon indicating copy to clipboard operation
covr copied to clipboard

test_coverage_active_file() not working with test fixture and testthat::it() function

Open mjfrigaard opened this issue 1 year ago • 1 comments

Hi there 😄 --I created a small example package that reproduces the issue I'm having.

To summarize: test_active_file() shows the tests are running and passing, but test_coverage_active_file() is showing 0.00%. When I use data not stored in a test fixture, test_coverage_active_file() is showing 100.00%.

Below is a layout of my tests/ folder (in case this helps):

tests
├── testthat
│   ├── _snaps
│   ├── fixtures
│   │   ├── make-test_data.R
│   │   └── test_data.rds <- test fixture causing issue
│   ├── helper.R
│   ├── setup.R
│   ├── test-pivot_term_long.R
│   ├── test-process_text.R <- test causing issue
│   └── test-sep_cols_mult.R
└── testthat.R

Thank you!

mjfrigaard avatar Nov 10 '23 15:11 mjfrigaard