-
-
Notifications
You must be signed in to change notification settings - Fork 639
fix(biome-js-analyze): fixed the diagnostic message for noFocusedTests to display the offending fn name #6599
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
Conversation
🦋 Changeset detectedLatest commit: 77a4a15 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #6599 will not alter performanceComparing Summary
|
review please :-) |
crates/biome_js_analyze/src/lint/suspicious/no_focused_tests.rs
Outdated
Show resolved
Hide resolved
…s to display the offending fn name
5986ab1
to
84a741c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left few changes for the changeset. Thank you!
.changeset/fix_no_focused_tests_diagnostic_message_to_have_correct_fn_name.md
Outdated
Show resolved
Hide resolved
.changeset/fix_no_focused_tests_diagnostic_message_to_have_correct_fn_name.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor things regarding the lint message.
crates/biome_js_analyze/src/lint/suspicious/no_focused_tests.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/tests/specs/suspicious/noFocusedTests/invalid.js.snap
Outdated
Show resolved
Hide resolved
…rect_fn_name.md Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
…rect_fn_name.md Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
…s to display the offending fn name
…s to display the offending fn name
…s to display the offending fn name
Example for `fdescribe`: | ||
|
||
```diff | ||
-│i The 'only' method is often used for debugging or during implementation. It should be removed before deploying to production. | ||
+│i The fdescribe method is often used for debugging or during implementation. It should be removed before deploying to production. | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeset needs to be updated
Summary
Fixed #6380: The
noFocusedTests
rule now correctly displays the function name in the diagnostic message when a test is focused.Every instance of a focused test function (like
fdescribe
,fit
,ftest
) had the word 'only' hardcoded.This has been updated to use the actual function name, so the message is now more accurate and specific.
Example for
fdescribe
: