-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add test.coveragePathIgnorePatterns
option
#12238
base: main
Are you sure you want to change the base?
Add test.coveragePathIgnorePatterns
option
#12238
Conversation
❌ @Jarred-Sumner, your commit has failing tests :( 💪 1 failing tests Darwin AARCH64
💻 1 failing tests Darwin x64 baseline
💻 1 failing tests Darwin x64
🐧💪 1 failing tests Linux AARCH64
🐧🖥 1 failing tests Linux x64 baseline
🐧🖥 1 failing tests Linux x64
🪟💻 3 failing tests Windows x64 baseline
🪟💻 3 failing tests Windows x64
|
I've asked for an option in Bun Test to ignore certain files (like Jest or Vitest) in bun's discord before. I've even made jokes about that. Thanks @jakeboone02, instead of complaining like I did, you fixed it :) |
To be fair, I did complain about it before I did anything about it. :) Now if I could only get those CI tests passing... I'm not sure what's going on. They pass on my machine! |
any news regarding this one? maybe they changed something in latests tests |
What does this PR do?
bun:test
option similar to Jest'scoveragePathIgnorePatterns
#4021.Adds a
coveragePathIgnorePatterns
option tobunfig.toml
similar to Jest's option of the same name.Per #4021 (comment), the value can be a glob pattern or an array of glob patterns. File paths matching any of the globs will be ignored for the purpose of coverage % calculation and reporting.
I do have a couple of questions/concerns:
If all tested file paths are ignored (e.g.,
"**"
) and the coverage reporter is "lcov", thelcov.info
file is created but left empty. Seems maybe technically correct, but LCOV processing tools might error (genhtml
definitely errors; I'm not sure about others).The glob matcher seems strict to me, at least in this context. For example,
"*.js"
won't match anything but"**/*.js"
will. Probably not a big deal, but we might consider relaxing it a little. I don't have an opinion either way.Documentation or TypeScript types
Code changes
How did you verify your code works?
I wrote automated tests.