-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add helloworld-jest-test-sample #251
Conversation
|
||
You can find the accompanying documentation at: | ||
|
||
- https://code.visualstudio.com/api/working-with-extensions/testing-extension#jest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I have the docs PR open, I updated this link.
@octref - Should I include a link to this sample in the Getting Started section of the |
Update it in https://github.com/microsoft/vscode-extension-samples/blob/master/.scripts/samples.js and run https://github.com/microsoft/vscode-extension-samples/blob/master/.scripts/update-readme.js. |
You can find the accompanying documentation at: | ||
|
||
- https://code.visualstudio.com/api/working-with-extensions/testing-extension#testing-extension-with-jest | ||
- https://github.com/bmealhouse/vscode-jest-test-runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't usually link to personal repos — sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, that makes sense.
// process.env.JEST_TEST_RUNNER_SETUP = path.resolve( | ||
// __dirname, | ||
// './custom-vscode-jest-test-runner-setup.js' | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind pointing either to VS Code website in this section or moving https://github.com/bmealhouse/vscode-jest-test-runner#jest_test_runner_setup over to the README and point to it?
We would like to make sure all links link to official Microsoft resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM. I just realized that you published your own test-runner, and it makes sense to have documentation there.
Would you be interested in merging the code to vscode-test repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will look into moving this code over to the vscode-test repo and updating the docs accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, you can use extensionTestsEnv
, see https://github.com/microsoft/vscode-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened up a draft PR to move the runner over to vscode-test
: microsoft/vscode-test#59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have completed my testing. After merging and releasing microsoft/vscode-test#59, the only thing remaining for this PR is to upgrade dependencies (and rebase if that's something you'd prefer).
Very good work! Just a few minor picks. |
// process.env.JEST_TEST_RUNNER_SETUP = path.resolve( | ||
// __dirname, | ||
// './custom-vscode-jest-test-runner-setup.js' | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, you can use extensionTestsEnv
, see https://github.com/microsoft/vscode-test
@bmealhouse @octref is there much left on this? It seems close, whats the blockers? |
"args": [ | ||
"--disable-extensions", | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"--extensionTestsPath=${workspaceFolder}/node_modules/vscode-test/out/jest-runner" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this path doesn't exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs to be merged and released before the path will exist: microsoft/vscode-test#59
@@ -0,0 +1,12 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tslint is deprecated, can this be changed to eslint?
Or just remove it entirely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be es2019 now to match up with https://github.com/microsoft/vscode-extension-samples/blob/master/webpack-sample/tsconfig.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once changed bump VSCode up to “^1.49” in package.json
Closed this PR since it's so old. Feel free to reopen if it's something you still plan to tackle @connor4312. |
Sample for upcoming jest documentation: microsoft/vscode-docs#3363