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

Run option is not showing only debug option is visible. Also Instead of tick or cross mark it is showing the circle #651

Open
jakkirhussain opened this issue Jan 25, 2021 · 8 comments

Comments

@jakkirhussain
Copy link

Environment

  1. node -v: [v12.18.4]

  2. npm -v: [6.14.6]

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): [└── (empty)]

  4. your vscode-jest settings if customized:

    • jest.pathToJest? [fill]
    • jest.pathToConfig? [fill]
    • anything else that you think might be relevant? [fill]
  5. Operating system: [mac]

Prerequisite

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

Steps to Reproduce

[fill]

Relevant Debug Info

[fill]

Expected Behavior

[run option]

Actual Behavior

[no run option]


The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...

@jakkirhussain jakkirhussain changed the title Run option is not showing only debug option is visible Run option is not showing only debug option is visible. Also Instead of tick or cross mark it is showing the circle Jan 25, 2021
@connectdotz
Copy link
Collaborator

Not sure what you mean by "run option"...? we only have the debug codeLens. A circle most likely means 'unknown'... feel free to provide a sample repo or try the latest alpha

@jakkirhussain
Copy link
Author

there is circle instead of tick or cross mark
Screenshot 2021-01-27 at 9 47 16 AM

@connectdotz
Copy link
Collaborator

ok, the test is showing an "unknown" status, did you happen to have jest.debugCodeLens.showWhenTestStateIn setting that includes "unknown", which might explain the debug codeLens appearance.

In any case, please try v4.0.0-alpha.3 as it has addressed matching/status issues like this.

@yravid
Copy link

yravid commented Oct 4, 2021

I am having the same issue,
Also on the test explorer I only see 'debug' action near the tests.
Other people running the same vscode-jest (4.1.2) & VS code version (1.60.2) and same repo don't have this issue.
node v12.21.0
npm 6.14.11
npm ls jest
├─┬ @vue/cli-plugin-unit-jest@5.0.0-beta.4
│ └── jest@27.2.4
└── jest@27.2.4
"jest.jestCommandLine": "node_modules/.bin/jest"
other vscode-jest settings not customized
Operating system: Mac Big Sur (11.6)

Also when loading the repo I get errors from Jest(Extension):
not-test onProcessExit: process exit with code=127, signal=undefined
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
env: node: No such file or directory
Jest process "watch-tests" ended unexpectedly
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting

@connectdotz
Copy link
Collaborator

@yravid first issue:

env: node: No such file or directory

This means we were not able to start the jest process for you due to the env issue, please see this comment to see if you can address it.

2nd:

Also on the test explorer I only see 'debug' action near the tests.

For the "watch" mode (the default), the test run are determined by the external jest watchman, so no manual run control is needed in the TestExplorer. If you want to control what and when to run the tests, you can try to configure it via the jest.autoRun settings and the run action should appear in the TestExplorer.

@yravid
Copy link

yravid commented Oct 5, 2021

@yravid first issue:

env: node: No such file or directory

This means we were not able to start the jest process for you due to the env issue, please see this comment to see if you can address it.

2nd:

Also on the test explorer I only see 'debug' action near the tests.

For the "watch" mode (the default), the test run are determined by the external jest watchman, so no manual run control is needed in the TestExplorer. If you want to control what and when to run the tests, you can try to configure it via the jest.autoRun settings and the run action should appear in the TestExplorer.

Thank you for your answer, I got it to work partially, I don't see the "run" option that my friend has by default, the debug button on top of the test is gone and also the clicking the Icon left to the test does nothing.
Screen Shot 2021-10-05 at 14 38 30
Screen Shot 2021-10-05 at 14 38 34
Right click and debug is the only thing that works now.

BTW, The developer tools doesn't show any env logs as shown here: vscode-jest-env-log.gif

@21lucasmessias
Copy link

Add

"jest.autoRun": "off",

to your config file

@Alina118118
Copy link

@21lucasmessias that's worked for me) Thanks
Screenshot 2022-03-25 122728

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

5 participants