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

no-setup-in-describe triggers on describe.skip #249

Closed
edg2s opened this issue May 25, 2020 · 4 comments · Fixed by #256
Closed

no-setup-in-describe triggers on describe.skip #249

edg2s opened this issue May 25, 2020 · 4 comments · Fixed by #256
Labels

Comments

@edg2s
Copy link
Contributor

edg2s commented May 25, 2020

describe.skip( 'My test', () => {
  it( 'Something', () => {
    // Foo
  } );
} );

This should not trigger no-setup-in-describe, yet it does.

This can be worked around by moving the skip to each of the it calls.

@lo1tuma
Copy link
Owner

lo1tuma commented May 27, 2020

Can you explain why it shouldn’t trigger? If the test code is not ready or somehow broken it should be removed. If it is important enough to keep the test code then it should be also important enough to refactor and move the setup code to the appropriate places.

@edg2s
Copy link
Contributor Author

edg2s commented May 27, 2020

The rule should only trigger when there is setup code in the describe, and there isn't any.

@lo1tuma
Copy link
Owner

lo1tuma commented May 27, 2020

There is a describe block in your example.

@lo1tuma
Copy link
Owner

lo1tuma commented May 27, 2020

I guess I understand the issue now. I thought this issue was a feature request to skip checking for setup code when using describe.skip(), but it is actually a bug, where describe.skip() triggers this rule even when there is no setup code.

Thanks for reporting. That is definitely a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants