Repository navigation
fix(bun): treat bun test arguments as path filters - #2165
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
commit: |
webpro
approved these changes
Oct 19, 2026
webpro
left a comment
Member
There was a problem hiding this comment.
Thanks for the pull request, Jake! I've added two small follow-up commits: bun test . now maps to the default test patterns, and dotted filters like .integration match by file name unless they end in a JS/TS extension.
Member
|
🚀 This pull request is included in v6.42.1. See Release 6.42.1 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bun testreads an argument as a path only when it starts with./,../or/. Any other argument is a filter: Bun runs every test file whose path contains it. The Bun plugin treated those filters as literal paths, so a script likebun test .dom.test.tsxproduced the entry.dom.test.tsx, matched nothing, and every test file it runs was reported as unused.Filter arguments now become entry patterns: one ending in an extension matches paths ending with it (
**/*.dom.test.tsx), and any other matches test files under a directory or with a file name containing it. Glob and./-style path arguments keep their current behavior.Added a
bun9fixture with an extension filter, a directory filter, and a test file neither matches, which is still reported. The test fails without the fix; the Bun plugin tests, the full suite (1,467 passing), lint, format and build pass.🤖 Generated with Claude Code