Skip to content

Commit

Permalink
prepare for 4.1 release (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
connectdotz committed Aug 21, 2021
1 parent 12dca20 commit 4b88a2d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 51 deletions.
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/**
.vscode-insiders/**
.vscode-test/**
src/**
**/*.map
Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<!--
Please add your own contribution below inside the Master section
Bug-fixes within the same version aren't needed
Please add your own contribution below inside the Master section
## Master
* brief change description - @author
-->

### 4.1.0
* fix type warning in settings.json when using the `{"autoRun": "off"}` option - @tommy
* fix couple of test result matching issues - @connectdotz (#737)
* update match API/attributes to support up-coming vscode test provider API. - @connectdotz (#737)
* support official vscode Test Explorer and API in v1.59 - @connectdotz (#742)
*
-->

### 4.0.3
* add `--watchAll=false` to non-watch tasks - @connectdotz
* move save related operations to new SaveTextDocument event listeners to prevent duplicate firing and losing test state for watch-mode + clean-doc-save combination. - @connectdotz
Expand Down
95 changes: 50 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,12 @@ Possible status are: `[ "fail", "pass", "skip", "unknown"]`. Please note that th

There are 2 formatters to choose from:
1. <details><summary> DefaultFormatter: high light uncovered and partially-covered code inlilne as well as on the right overview ruler. (this is the default)</summary>

![coverage-DefaultFormatter.png](./images/coverage-DefaultFormatter.png)
</details>

2. <details><summary>GutterFormatter: render coverage status in the gutter as well as the overview ruler.</summary>
1. <details><summary>GutterFormatter: render coverage status in the gutter as well as the overview ruler.</summary>

![coverage-GutterFormatter.png](./images/coverage-GutterFormatter.png)
</details>

Expand All @@ -298,15 +300,16 @@ There are 2 formatters to choose from:
Besides the formatter, user can also customize the color via `jest.coverageColors` to change color for 3 coverage categories: `"uncovered", "covered", or "partially-covered"`,
<details>
<summary>example</summary>

for example:
```
```json
"jest.coverageColors": {
"uncovered": "rgba(255,99,71, 0.2)",
"partially-covered": "rgba(255,215,0, 0.2)",
}
```
the default color scheme below, note the opacity might differ per formatter:
```
```json
"jest.coverageColors": {
"covered": "rgba(9, 156, 65, 0.4)",
"uncovered": "rgba(121, 31, 10, 0.4)",
Expand All @@ -316,67 +319,69 @@ for example:
</details>

##### autoRun
```json
```ts
AutoRun =
| 'off'
| { watch: true; onStartup?: ["all-tests"] }
| { watch: true, onStartup?: ["all-tests"] }
| {
watch: false;
onStartup?: ["all-tests"];
onSave?: 'test-file' | 'test-src-file';
watch: false,
onStartup?: ["all-tests"],
onSave?: 'test-file' | 'test-src-file',
}
```
<details>
<summary>example</summary>

- Turn off auto run, users need to trigger tests run manually via [run commands](#commands-run) and [menus](#context-menu):
```json
"jest.autoRun": "off"
```
- Run all the tests in the workspace upon extension startup, followed by jest watch run for subsequent test/src file changes.
``` json
"jest.autoRun": {
"watch": true,
"onStartup": ["all-tests"]
}
```
- Only run tests in the test file when the test file itself changed. It will not run all tests for the workspace upon start up, nor triggering any test run when the source file changed.
``` json
"jest.autoRun": {
"watch": false,
"onSave": "test-file"
}
```
- Like the one above but does run all tests upon extension start up
``` json
"jest.autoRun": {
"watch": false,
"onSave": "test-file",
"onStartup": ["all-tests"]
}
```
- Turn off auto run, users need to trigger tests run manually via [run commands](#commands-run) and [menus](#context-menu):
```json
"jest.autoRun": "off"
```
- Run all the tests in the workspace upon extension startup, followed by jest watch run for subsequent test/src file changes.
```json
"jest.autoRun": {
"watch": true,
"onStartup": ["all-tests"]
}
```

- Only run tests in the test file when the test file itself changed. It will not run all tests for the workspace upon start up, nor triggering any test run when the source file changed.
``` json
"jest.autoRun": {
"watch": false,
"onSave": "test-file"
}
```
- Like the one above but does run all tests upon extension start up
``` json
"jest.autoRun": {
"watch": false,
"onSave": "test-file",
"onStartup": ["all-tests"]
}
```
- migration rule from settings prior to v4:
- if `"jest.autoEnabled" = false` => manual mode: `"jest.autoRun": "off"`
- if `"jest.runAllTestsFirst" = false` => `"jest.autoRun": {"watch": true }`
- if no customization of the 2 settings and no `"jest.autoRun"` found =>
``` json
"jest.autoRun": {
"watch": true,
"onStartup": ["all-tests"]
}
```
``` json
"jest.autoRun": {
"watch": true,
"onStartup": ["all-tests"]
}
```
</details>

##### testExplorer
```json
```ts
testExplorer =
| {enabled: true; showClassicStatus?: boolean; showInlineError?: boolean}
| {enabled: false}
| {enabled: true, showClassicStatus?: boolean, showInlineError?: boolean}
```
- `showClassicStatus`: show status symbol (prior to 4.1) in editor gutter, in addition to explorer status symbols. default is false if explorer is enabled.
- `showInlineError`: show vscode style inline error and error message viewer, default is false.
- `enabled`: switch to turn on/off the explorer support. Default is true.
- `showClassicStatus`: (optional) show status symbol (prior to 4.1) in editor gutter, in addition to explorer status symbols. Default is false if explorer is enabled.
- `showInlineError`: (optional) show vscode style inline error and error message viewer. Default is false.

default is `"jest.testExplorer": {"enabled": true}`
4.1 default is `"jest.testExplorer": {"enabled": true}`
>
### Debug Config

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-jest",
"displayName": "Jest",
"description": "Use Facebook's Jest With Pleasure.",
"version": "4.1.0-rc.3",
"version": "4.1.0",
"publisher": "Orta",
"engines": {
"vscode": "^1.59.0"
Expand Down

0 comments on commit 4b88a2d

Please sign in to comment.