-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Cannot determine how Jest is skipping tests #4763
Comments
Hey @mandysimon88. Why are you not sticking to the issue template? |
I didn’t use the template because my question was straightforward. I chose to post it here rather than StackOverflow because I’m convinced I can’t be the only person who will have this problem with Jest.
It’s not the testRegex, because this only happens on my machine. Fresh install of our repo, Jest etc. Everyone else on the project is able to run all the tests… Just trying to figure out “other”, non-obvious reasons Jests would skip so many files.
… On Oct 26, 2017, at 2:25 AM, Michał Pierzchała ***@***.***> wrote:
Hey @mandysimon88 <https://github.com/mandysimon88>. Why are you not sticking to the issue template?
Does skip means it doesn't see them, or mark as skipped? If the former is true – it's your testRegex or testMatch not picking up these files, if the latter – you have tests without function as a second argument. Closing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4763 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AMQpjOiFbhFtqKUEqVtxJ3j-mScvzws-ks5swCXDgaJpZM4QGyJs>.
|
Is your project in a folder that is ignored by Jest, like node_modules or a cache directory or something like that? |
i'm having a similar issue with Jest. Is there a place to check how it's choosing which files to ignore? |
If you do |
Same, I'm seeing 6 skipped tests, I'm pointing at my tests folder, so there shouldn't be anything weird it's picking up, my code doesn't have |
Do you have an example of a skipped test? If you point jest directly at a test file with skipped tests, are they still skipped? |
I'm having the same issue here, already deleted the Here's one sample
|
Can you paste in the output from jest when skipping? |
Oh, I see it.
|
lol! My bad, thanks @SimenB ! |
Similar issue. No Am I missing something? Seems like there should be a way to figure out which tests are being skipped without hunting for missing parens. |
Can you provide a repro? |
I didn't even know about the Do you get any better output passing both The docs for expand doesn't mention the skipped test behavior... |
Working with a private company repo, unfortunately! I don't see any difference in adding both flags, although adding |
You can try to activate the lint rule which looks for skipped tests, maybe it can track it down for you? |
I'm having this problem as well. The "lint rule" you linked to makes no sense to me; all it says is "here's how to not skip tests: these are the ways to skip tests...." --very confusing. |
@chaim-sw Add it to your eslint setup and run it against your code. See https://eslint.org/docs/user-guide/getting-started and https://eslint.org/docs/user-guide/configuring for configuring plugins |
I came here because Jest was skipping tests. In my case it was a |
I've hit this a few times (especially with the jest-eslint-runner) A custom reporter can help here so I just published jest-skipped-reporter It's super basic, but should help with debugging 👌 |
It seems like the ideal behavior would be to have the default reporter show the location of the skipped tests along with PASS/FAIL tests. So adding a yellow I'd be happy to throw something together. I'm not super familiar with the codebase, but it looks like most of the changes would be needed in the default reporter, summary reporter, and Then perhaps "Watch usage" could have options like "show only failing tests" or "filter skipped tests" to address the issue raised in #2169? Or vice versa: we could have an option in "Watch usage" to show skipped tests. Thoughts? |
Yeah i think it would be way more useful to say SKIP instead of FAIL |
This is a great use case for the new watch mode plugin system cc @rogeliog @JonathanTR yeah, that's exactly where this would get added. What would you show if a file has both a failed test and a skipped test? Also, since the default reporter prints the results of the file and not the individual specs in the file, you'll still need a way to see which tests within a suite were skipped. I suppose we could only show that there was a skipped test in the file for the default reporter, and recommend dropping into |
@rickhanlonii That's a great point. I think I would expect to see a failed test take precedence over a skipped one? So if I fixed the failing test, the file would start showing Re: displaying individually skipped tests, Jest already shows individual test results when you filter for a file, so it makes sense me that the default behavior would be to see them there: I wasn't aware of watch mode plugins, but they sound cool! For folks following along, looks like there is a statement of intent here and a pull request here. |
This is a little unfortunate, in that there's no advantage, for a single test, in displaying |
I had some tests that were being skipped, turns out it was because they were wrapped in |
I didn't have any 'it.skips', but I did have a rogue 'it.only' that I'd forgotten about that was causing other tests not to run. Easily located with --verbose. |
For anyone having the same problem: in my case it was a "fit", which caused other tests of the suite to be skipped. |
I had 13 skipped files and couldn't find any way to find them usint PS: I also added the For the reason why it was being skipped, it was a |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When I run Jest in watch mode and hit "a" (to run all tests), Jest still skips 18 test files. I cannot find anything anywhere in my code that would explain how or why it is doing this.
I welcome suggestions. Not sure what code even to put up in reporting this, as my test files show nothing interesting (no Jest settings or anything like that).
The text was updated successfully, but these errors were encountered: