microsoft / vscode-docs

Public documentation for Visual Studio Code
http://code.visualstudio.com/docs
Other
5.67k stars 4.6k forks source link

Jest test runner #3363

Closed bmealhouse closed 4 years ago

bmealhouse commented 4 years ago

mocha is the only documented VS Code test runner for extensions.

Would you be willing to accept a PR documenting how to use jest as a test runner?

I recently released an npm package jest-runner-vscode that simplifies this process, and I'd be happy to open a PR to document this. The package is currently in use by my VS Code extension: shifty.

gregvanl commented 4 years ago

Adding @octref to have a look at your jest test runner.

bmealhouse commented 4 years ago

Great, thanks for looking into it!

Let me know If the test runner falls short in any way. I'd be happy to make improvements!

octref commented 4 years ago

I look forward to your PR. This will help https://github.com/microsoft/vscode-test/issues/23 and https://github.com/microsoft/vscode-test/issues/37

bmealhouse commented 4 years ago

Great, I will get started on this.

bmealhouse commented 4 years ago

@octref - I'm also discussing this package with the Jest team, so can we hold off on merging this to make sure everything is clear? See https://github.com/facebook/jest/pull/9542.

bmealhouse commented 4 years ago

@octref - Both PRs are ready for review.

jest-runner-vscode was not invoked by Jest, so I had the package name wrong (according to the Jest runner documentation).

Since that could be a common source of confusion, I've renamed the package to vscode-jest-test-runner and updated the docs accordingly.

Please let me know if you have any questions.

gregvanl commented 4 years ago

Closing until the upstream PRs are merged. We can reopen this PR is Jest support is added to the test runner.