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

0/0 tests passed #749

Closed
agos opened this issue Aug 17, 2021 · 5 comments
Closed

0/0 tests passed #749

agos opened this issue Aug 17, 2021 · 5 comments

Comments

@agos
Copy link

agos commented Aug 17, 2021

Environment

  1. vscode-jest version: v4.1.0-rc.2
  2. node -v: v14.7.0
  3. npm -v or yarn --version: 6.14.7
  4. npm ls jest or npm ls react-scripts (if you haven’t ejected): react-scripts@4.0.3
  5. your vscode-jest settings if customized: not customised
  6. Operating system: macOS 11.4 (20F71)

Prerequisite

  • are you able to run jest test from the command line? yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) yes

Steps to Reproduce

open a repository with tests, focus on text explorer view, wait for tests to run

Expected Behavior

The message at the top reflects the number of passed tests and the total

Actual Behavior

Regardless of how many tests were run and how many did pass, the indicator shows "0/0 tests passed (0.00%)".

If some tests were skipped, this is reported correctly in the sidebar title. The test explorer shows correctly the status of passed/not passed/skipped tests once they are completed (but they are not updated while running, only after the run)

@connectdotz
Copy link
Collaborator

Regardless of how many tests were run and how many did pass, the indicator shows "0/0 tests passed (0.00%)".

this is a known issue and vscode team is aware and hopefully will be addressed soon: microsoft/vscode#129444 (comment)

The test explorer shows correctly the status of passed/not passed/skipped tests once they are completed (but they are not updated while running, only after the run)

During the run, only the file level item and above will be marked busy (spinning), we didn't force every item under it to be spinning as well. However, I can see it could be easily missed especially if there are lots of tests in the file... We could experiment with a deep status update...

@dominic-simplan
Copy link

Should this be working now? I can see that the vscode ticket is closed, but I also see the "0/0 tests passed" in VSCode 1.60.2 and vscode-jest 4.1.2.

@connectdotz
Copy link
Collaborator

@dominic-simplan the status on top of the TestExplorer is showing the "latest" run stats, it is not accumulated of the overall tests stats. I can see why it is confusing... Basically, if you are in "watch" mode (the default) and there is no change (determined by jest watchman), then the run stats will show "0/0 tests passed". It should show different stats once you changed something...

I agree it will be nice to show the accumulated overall stats, but that was not the case currently. However, you can easily see the "failed" test by either filtering by "Show Only Failed Tests" or change the sort order to "Sort By Status" in the TestExplorer.

@dominic-simplan
Copy link

I see, thanks for the explanation!
I can confirm that the numbers change if I watch mode actually runs some tests.

@connectdotz
Copy link
Collaborator

as explained above, this is not an issue.

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

No branches or pull requests

3 participants