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

Add rule to avoid test.only() #4

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

IrinaSer
Copy link

@IrinaSer IrinaSer commented Sep 7, 2023

Fixes #3

Examples of **incorrect** code for this rule:

```javascript
test.only();
Copy link

Choose a reason for hiding this comment

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

Let's add a full example with test description and test body

Copy link
Author

Choose a reason for hiding this comment

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

Added full test example.

Copy link

Choose a reason for hiding this comment

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

I see old one in File changed. Maybe you forgot to git push?

Copy link
Author

Choose a reason for hiding this comment

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

Yep.
Now I pushed changes.

@ai
Copy link

ai commented Sep 7, 2023

There is a good practice adding to PR description (you still can edit it)

Fixes #3 

With it, issues will be closed automatically on PR merge.

@IrinaSer
Copy link
Author

IrinaSer commented Sep 7, 2023

Thank you! I didn't know that.
Updated PR description.


```javascript
test.only("sum", () => {
tassert.type(math.sum, "function");
Copy link

Choose a reason for hiding this comment

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

Let’s remove 15-18 and 26-29 lines to focus on important.

Use () => {} like in other rules.

@ai
Copy link

ai commented Sep 7, 2023

Looks good for me. Let’s wait @yudai-nkt review. He knows more about ESLint.

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.

Add rule to avoid test.only
2 participants