jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.82k stars 291 forks source link

[BUG] This project cannot be used #1137

Closed crazyair closed 2 months ago

crazyair commented 2 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce https://github.com/react-component/cascader

Note: A sample repo will help us identify the bug much faster. 🙏

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Prerequisite

Additional context Add any other context about the problem here.


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

crazyair commented 2 months ago

image

{
  "jest.jestCommandLine": "npx rc-test"
}
crazyair commented 2 months ago
{
  "jest.jestCommandLine": "npm run test"
}

image

connectdotz commented 2 months ago

@crazyair, a few things:

  1. "rc-test" seems to misinterpret the jest command line option "--watchAll=false". It went into watch mode instead, the opposite of what it should do. You can easily verify this with

    npx rc-test --listTests  --watchAll=false

    Compared with running jest directly:

    npx jest --listTests  --watchAll=false

    This is why your first screenshot showed spinning status as the run was never finished. You might want to file a ticket to the rc-test team. This is similar to the issue here, which can be better handled with PR #1134 even if the external systems misbehave.

  2. Your 2nd attempt to use "npm run test" is almost correct... just need to add "--" at the end, such as

    "jest.jestCommandLine": "npm run test --"

    But the test will still hang because of the issue mentioned above.

Please look for the upcoming release v6.2.4 that will include PR #1134. Meanwhile, please let me know if you have any other questions.

crazyair commented 2 months ago

https://github.com/jest-community/vscode-jest/pull/1134 When to release, after release I verify that the next run does not stop the problem.

Also, where can I see the execution of the command. Influence. Sometimes I do. Sometimes not.

connectdotz commented 2 months ago

Sorry if I didn't make it clear: v6.2.4 hasn't been released yet. I plan to release it this week.

Also, where can I see the execution of the command

You can also see the jest commands in the "Jest (xxx)" Terminal; or if you have "jest.debugMode" set to true, it will show the full spawned command in your developer console too.

crazyair commented 2 months ago

Sorry if I didn't make it clear: v6.2.4 hasn't been released yet. I plan to release it this week.

Also, where can I see the execution of the command

You can also see the jest commands in the "Jest (xxx)" Terminal; or if you have "jest.debugMode" set to true, it will show the full spawned command in your developer console too.

Yeah, I know. I'm waiting.

connectdotz commented 2 months ago

@crazyair, v6.2.4 has been released. Can you confirm if your problem is resolved?

crazyair commented 2 months ago

@crazyair, v6.2.4 has been released. Can you confirm if your problem is resolved?

yes