Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find coverage file #353

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

timthelion
Copy link
Contributor

No description provided.

@timthelion
Copy link
Contributor Author

timthelion commented Jan 5, 2022

I'm not a node developer. Is it easy/reasonable to create a temp dir for testing? Currently, this isn't done in the test suit:

test("findCoverageFiles returns an error if no coverage file @unit", async () => {
but should be both for the happy path and this unhappy one. Can someone help me with that? I don't even know how to interact with the fs in node ;)

@timthelion
Copy link
Contributor Author

Weirdly, this doesn't actually fix it for me when I install the vsix file. But the new error message was enough for me to figure out which dir I had to add to the ignore list. Adding the bad directory to the ignore list did fix this and I think the PR is still totally valid.

@ryanluker
Copy link
Owner

@timthelion Thanks for the PR! I will hopefully have some time this weekend to review it for yeah and hopefully merge it into the next release. Definitely looks like an improvement though on the error message from a first glance 🤔.

@ryanluker ryanluker added this to the 2.9.0 milestone Jan 7, 2022
@ryanluker ryanluker linked an issue Jan 7, 2022 that may be closed by this pull request
@@ -92,9 +92,16 @@ export class FilesLoader {
dot: true,
ignore: this.configStore.ignoredPathGlobs,
realpath: true,
strict: false,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my understanding, the glob find will continue on error to try to find a possible match correct?
Before this (due to the bug you mentioned) it would stop abruptly if an error occurred even if everything had not yet been searched?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's right. With strict true it dies if it hits an error.

Copy link
Owner

@ryanluker ryanluker Jan 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, merging this and it should go out in the 2.9.0 release whenever I get around to finish a couple of the other items.

Copy link
Owner

@ryanluker ryanluker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the contribution, just one question around the strict flag.

@ryanluker ryanluker merged commit 345233a into ryanluker:master Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find a Coverage file!
2 participants