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

[expect-expect] rule shouldn't warn on skipped tests #988

Closed
julienw opened this issue Nov 22, 2021 · 3 comments
Closed

[expect-expect] rule shouldn't warn on skipped tests #988

julienw opened this issue Nov 22, 2021 · 3 comments

Comments

@julienw
Copy link

julienw commented Nov 22, 2021

Example code:

    // eslint-disable-next-line jest/no-disabled-tests
    it.skip('some useful title', function () {
      // TODO - We should wait until...
    });

expect-expect warns on such code, but I think it shouldn't because the test is skipped.

@julienw
Copy link
Author

julienw commented Nov 23, 2021

Looks like this is done for it.todo, so this shouldn't be too hard to fix this too.

@G-Rath
Copy link
Collaborator

G-Rath commented Nov 25, 2021

The reason we don't error on it.todo is that you can't have an expect in a todo - whereas a skip is meant to be a complete test e.g. in your example you're using it.skip for what it.todo is meant for.

@G-Rath
Copy link
Collaborator

G-Rath commented Jan 1, 2022

I'm going to close this because it's not a bug per my previous comment, and I currently don't think there's a lot of want for this for it to be worth implementing an option (since this is the first time someone has commented on it).

If more folks comment here or make new issues requesting it as an option, I'm happy to do a PR.

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

No branches or pull requests

2 participants