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

fix(linter): fix rule noFocusedTests checking test call expressions #3793

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Sep 5, 2024

Summary

closes #3791

Fixed a case where test call expressions are failed to be treated as one of them.

Previously:

describe.only("foo", () => {});
describe.only(foo, () => {}); // ❌ failed to report as linter error

Only supports test call expressions with string-like expressions.

Currently:

describe.only("foo", () => {});

// works with any JavaScript expression
describe.only(foo, () => {});
describe.only(foo.bar, () => {});

Every JavaScript expression is supported.

Test Plan

Tests are added.

@github-actions github-actions bot added A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Sep 5, 2024
@h-a-n-a h-a-n-a marked this pull request as ready for review September 5, 2024 10:50
@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Sep 5, 2024

@chansuke Hi! I think it's ready ❤️ Thank you for helping me review this.

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

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

LGTM :)

Could you add an entry in our CHANGELOG?

@github-actions github-actions bot added the A-Changelog Area: changelog label Sep 5, 2024
@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Sep 5, 2024

LGTM :)

Could you add an entry in our CHANGELOG?

Sure thing!

@Conaclos Conaclos merged commit d754371 into biomejs:main Sep 5, 2024
12 checks passed
@h-a-n-a h-a-n-a deleted the issue-3791 branch September 6, 2024 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter A-Parser Area: parser L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💅 noFocusedTests only works when the tests name is configured with a string literal
2 participants