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

test.concurrent support #432

Closed
daniellacosse opened this issue Oct 16, 2019 · 9 comments
Closed

test.concurrent support #432

daniellacosse opened this issue Oct 16, 2019 · 9 comments

Comments

@daniellacosse
Copy link

daniellacosse commented Oct 16, 2019

it appears that the linter ignores test.concurrent calls, for example - currently I have the jest/no-empty-title rule enabled:

Screen Shot 2019-10-16 at 16 20 16

with just test:

Screen Shot 2019-10-16 at 16 20 28

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 16, 2019

Ah yes - I missed that b/c of it's undocumented nature.

From memory it shouldn't be too much trouble to add it, just a matter of finding the time 😂

@daniellacosse
Copy link
Author

@G-Rath point me at where i need to do the thing and I'll do the thing

@G-Rath
Copy link
Collaborator

G-Rath commented Oct 16, 2019

@daniellacosse from memory, a couple of things need doing:

  • concurrent needs to be added as a value in the right enum,
  • concurrent should be checked for what it supports, as while I suspect it is only test.concurrent, we need to know if it.concurrent, test.concurrent.only, test.concurrent.each, etc are valid in jest.
  • All the rules should be checked, as jest/no-empty-title isn't the only one that this affects (or maybe it is - either way, need to check).
  • The jest/no-empty-title rule needs to be updated to include concurrent in what it checks. iirc this could be just a matter of adding it to the right enum, but otherwise it'll just be a matter of passing the new enum value in the right place.

@daniellacosse
Copy link
Author

daniellacosse commented Oct 17, 2019

fyi it's definitely all most of the rules, i've just included jest/no-empty-title as an example.


also, for posterity, the following are valid -

  • it.concurrent
  • it.concurrent.only
  • test.concurrent.only

but each and concurrent can't be used together.

Screen Shot 2019-10-17 at 10 18 33

@SimenB
Copy link
Member

SimenB commented Oct 27, 2019

but each and concurrent can't be used together.

that's a bug, mind opening up an issue at facebook/jest?

@daniellacosse
Copy link
Author

seems there is one - jestjs/jest#8985

@leonardovillela
Copy link
Contributor

Can i take this issue?

@SimenB
Copy link
Member

SimenB commented Dec 28, 2019

Go for it!

@G-Rath
Copy link
Collaborator

G-Rath commented Jan 4, 2020

closed by #498 / #502

@G-Rath G-Rath closed this as completed Jan 4, 2020
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

4 participants