Skip to content

Commit 10414ab

Browse files
authored
Run mode (#1078)
* replace legacy settings with runMode * implement deferred mode, enhance runMode config interface * implemented save runMode, refactor terminal revealOutput logic * fix runMode override previous setting bug * 1. refactor exec-error notification 2. add defer to quick-fix options 3. ensure one error report per process * adding runMode json schema * rename "manual" to "on-demand"; catch and notify when jest process failed to start * refactor quick-fix to use a quickPick instead * fix tests * adding compare-coverage script and instructions * adding missing tests * update README and remove inline menu icon * clean up and adding missing tests * rm orphan images * address coverage and cleanup * undo the accidental change in settings.json
1 parent 8a1b362 commit 10414ab

File tree

75 files changed

+3876
-1301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+3876
-1301
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
_jest-editor/
22
.vscode/symbols.json
3-
/coverage/
3+
/coverage*/
44
node_modules/
55
out/
66
generated-icons/
77

88
**/.DS_Store
99
*.vsix
1010
*.zip
11+
coverage_comparison_report.html

.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ generated-icons/
2828
release-notes/
2929
setup-wizard.md
3030
*.zip
31+
coverage*/
32+
scripts/**
33+
coverage_comparison_report.html
34+

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,24 @@ There are two debugging launch configurations defined in `.vscode/launch.json`:
104104

105105
To debug the extension, [change the launch configuration](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) to **Launch Extension** and start debugging.
106106

107-
**3. eat our own dog food**
107+
**3. check test coverage**
108+
109+
Make sure your changes are covered by unit tests and that you did not lose coverage compared to the master branch. While compared to master branch is part of PR workflow validation, it is always a good practice to check it locally before submitting the PR. The following is the step to do it:
110+
1. go back to master branch (`git checkout master`), run all tests with coverage, which should produce a "coverage" folder under the project root. Rename it to something like "coverage-master" to keep it for later comparison.
111+
2. switch back to your branch (`git checkout your-branch`), run all tests with coverage, which should produce a "coverage" folder under the project root.
112+
3. run compare-coverage script with the master and the current coverage folders, such as `yarn compare-coverage coverage-master coverage`. It will produce a report `coverage_comparison_report.html` under the project root.
113+
4. examine `coverage_comparison_report.html` to make sure your changes are fully tested therefore did not reduce coverage compared to master branch.
114+
115+
**4. eat our own dog food**
108116

109117
The ultimate test is to actually use it in our real day-to-day working environment for a while. There are multiple ways to do this:
110118

119+
The most accurate way is to install the extension locally and use it in your real project. You can do this by:
120+
- building a local installable package with command: `vsce package`. This will produce a `vscode-jest-xxx.vsix` file, where "xxx" is the version number in `package.json`.
121+
- install this file by using vscode command palette `Extensions: Install from VSIX...`.
122+
- after test, you can restore the official version from the vscode's extensions panel.
123+
124+
If you don't have vsce installed, you can try these methods instead:
111125
- by command line: `code --extensionDevelopmentPath=your-local-vscode-jest`
112126
- by environment variable: `CODE_EXTENSIONS_PATH`
113127
- by symlink:

README.md

Lines changed: 280 additions & 138 deletions
Large diffs are not rendered by default.

icons/coverage-on-20.svg

Lines changed: 1 addition & 0 deletions
Loading

icons/pause-on-20.svg

Lines changed: 1 addition & 0 deletions
Loading

images/debug-screen-shot.png

-207 KB
Binary file not shown.

images/jest-env-error.jpg

-104 KB
Binary file not shown.

images/pre-release.png

-464 KB
Binary file not shown.

images/quick-fix-chooser.png

286 KB
Loading

0 commit comments

Comments
 (0)