Closed amatosov-rbx closed 4 years ago
@amatosov-rbx Thanks for the pull request! Yah this makes sense to do as the coverage service already uses this manual config setting anyways and should respect that when listening to the file system too, good call! My only ask would be to add a small unit test to the test suite please 😁 and then this can be merged in against the 2.6.0 release. If you are feeling really adventurous you could even add it as an integration test so that way we know this works for windows, linux and macs 🤔 .
You are welcome @ryanluker. I have added couple unit tests for the CoverageService that verify glob creation for manual coverage files and regular use cases.
I am not sure how to implement integration tests for watch tho. Triggering watch update requires modifying files during the test execution, but tests run against the example
directory. I also noticed that there are no existing tests doing that type of checks.
What would be the best way to implement this sort of watch tests?
@amatosov-rbx We can probably leave out the integration tests as you mentioned they currently only use the display coverage command to test that coverage indicators are shown. The unit tests you added are more then enough for now!
Rational
I would like to use manualCoverageFilePaths with a set of explicit lcov files and avoid glob lookups, in order to optimize coverage-gutter on big workspaces.
createFileSystemWatcher
works well with the glob pattern which contains files inside and outside of the workspace and successfully watches files that are inside workspace foldersChanges
Update
listenToFileSystem
to listen formanualCoverageFilePaths
if they are providedTested on