test: 100% coverage in get-options-overrides (createFilter)#329
Conversation
- get the skipped test to work by using absolute paths, as that is what
the `filter` function expects (and is how it is used in this codebase)
- use the same helper func on the main `createFilter` test as well to
ensure that we're consistently testing the same paths
- (though `**/*` basically matches _everything_)
- add a test for project references as well
- and remove the `**/*` from the include for this so it doesn't match
everything
- this also tests the single string include code path as well
- add a test for the `context.debug()` statements as well
- couldn't get to 100% Funcs coverage without this
- used a simplified mock instead of actually using `RollupContext` so
that this doesn't rely on that file/unit to work
5c2cd1c to
c96c959
Compare
c96c959 to
0a71380
Compare
|
@ezolenko this PR wasn't quite complete -- note that CI was failing on Windows. I had made the in-line comment above to follow-up on, but hadn't had a chance to re-visit this. You marked the comment as "resolved", but it had not been resolved yet (hence why CI hadn't passed). I intended on writing a Windows workaround for the test and then making a different, isolated PR to fix the source issue (as this one is intended to just be a testing PR) here and for #321 (comment) (which are both in the same source file). Since this was merged early, I'll try to get that PR fix out today so that CI passes on I can't change PR settings myself, so you might want to change the settings to not allow PRs to be merged unless CI checks pass -- to prevent something like this in the future. |
Summary
Get 100% coverage of
get-options-overridesby adding tests for remaining parts ofcreateFilterFollow-up to #321 (comment) (plus more stuff too)
Details
get the skipped test to work by using absolute paths, as that is what the
filterfunction expects (and is how it is used in this codebase)createFiltertest as well to ensure that we're consistently testing the same paths**/*basically matches everything)add a test for project references as well
**/*from the include for this so it doesn't match everythingadd a test for the
context.debug()statements as wellRollupContextso that this doesn't rely on that file/unit to work