Skip to content

Commit 9ce5948

Browse files
authored
prepare for v6.1.0-next release (#1093)
1 parent e1f7492 commit 9ce5948

File tree

3 files changed

+166
-29
lines changed

3 files changed

+166
-29
lines changed

README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can see the full [features](#features) and learn more details in the [How-To
2626
Happy testing!
2727

2828
## Releases
29-
- **Next** ([v6.0.0](https://github.com/jest-community/vscode-jest/releases/tag/v6.0.0)): [release note](release-notes/release-note-v6.md#v600-pre-release)
29+
- **Next** ([v6.1.0](https://github.com/jest-community/vscode-jest/releases/tag/v6.1.0-next)): [release note](release-notes/release-note-v6.md#v610-pre-release)
3030
- **Current** ([v5.2.3](https://github.com/jest-community/vscode-jest/releases/tag/v5.2.3)): [release note](release-notes/release-note-v5.x.md#v523)
3131
- **Previous** ([v5.1.0](https://github.com/jest-community/vscode-jest/releases/tag/v5.1.0)): [release note](release-notes/release-note-v5.x.md#v510)
3232

@@ -108,32 +108,22 @@ For detailed releases and migration help, please see [releases](https://github.c
108108

109109
This extension fully integrates with the VSCode testing framework, supporting both automatic and on-demand test runs. In addition to the standard VSCode Test Explorer interface, the extension provides additional UI elements to simplify the development workflow:
110110

111-
<img src="images/testExplorer-6.0.2.png" alt="testExplorer.png" width="1000"/>
111+
<img src="images/interface-6.1.0.png" alt="interface-6.1.0.png" width="1000"/>
112112

113-
1. **Run Mode**: [Run mode](#runmode) dictates the overall user experience, determining when tests should run, how test outputs are displayed or cleared, etc. Different run modes may have different performance implications, particularly for larger projects. The run mode is visible in the Test Explorer (on the folder item) and on the status bar (refer to point 4). Users can change this setting either in `settings.json` (for all runs) or through the UI components mentioned below (for the current session):
114-
- **1.1** Adjust the RunMode using the Test Explorer's run configuration dropdown by selecting "Configure Test Profiles".
115-
- **1.2** Alternatively, alter the RunMode via the Test Explorer's inline menu (associated with the folder item).
113+
<br>
116114

117-
More info:
118-
- [How to change runMode](#runmode-chooser).
119-
- [RunMode performance tradeoff](#runmode-tradeoff)
120-
121-
2. **Test Menu**: Besides automatic test executions (if configured), users can initiate test actions on-demand via:
122-
- **2.1** The Test Explorer inline menu for individual test items. A right/alt click on an item also displays a context menu similar to the editor's gutter menu below.
123-
- **2.2** Right/Alt clicking on the test status indicator in the editor's gutter shows a context menu with relevant test actions, such as run, debug, view, or update snapshots.
124-
125-
More info:
126-
- [How to trigger a test run](#how-to-trigger-the-test-run)
127-
- [How to update and view snapshots](#how-to-update-and-view-snapshots).
115+
1. **Dynamic Run Mode**: [Run mode](#runmode) dictates the overall user experience, determining when tests should run, with or without coverage, error display style, etc. Different run modes may have different [performance implications](#runmode-tradeoff), particularly for larger projects.
116+
117+
We realized that runMode preference could change even within a given project, for example developers prefer "watch" runMode when doing light code changes to ensure nothing breaks, may prefer the 'on-demand' mode during heavy test development for greater control over test execution. A static runMode config in "settings.json" is simply not sufficient. Therefore, we added the [runMode quick switch](#runmode-chooser) so users can easily switch to different runMode without permanently modifying the "settings.json".
118+
<br>
128119

129-
3. **Test Output**: Alongside the test status visible in the editor and TestExplorer tree view, the extension offers native jest run outputs, extension configuration details, and [quick-fix](#quick-fix-chooser) suggestions through vscode terminals (labeled as "Jest (folder-name)"). By default, the output automatically appears when tests run, but this can be adjusted via the [runMode](#runmode) setting.
130-
- **3.1** The output terminal can be accessed on-demand using the TestExplorer inline menu (on the folder item) or the status bar item (refer to point 4).
120+
2. **Interactive Test Run**: Besides automatic test executions ("watch", "on-save"), users can initiate full test actions, such as run, debug, [update/view snapshot](#how-to-update-and-view-snapshots), from both editor and Test Explorer through various [UI components](#how-to-trigger-the-test-run).
121+
<br>
131122

132-
4. **Extension Status**: Upon successful launch of the extension, it displays the active folder run status and the aggregated workspace test stats in the status bar. Clicking on the item reveals the associated output window.
123+
3. **Test Output**: The extension offers native jest run outputs in both the "TERMINAL" and "TEST RESULTS" panel. "TEST RESULTS" panel mainly displays test run output in execution order, while "TERMINAL" groups test output by workspace folder/virtual-folder, and also includes extension configuration details, [quick-fix](#quick-fix-chooser) suggestions, etc. By default, the output appears when tests run, but this can be adjusted via the [outputConfig](#outputconfig) setting.
124+
<br>
133125

134-
More info:
135-
- [How to read the StatusBar](#how-to-read-the-statusbar)
136-
126+
4. **Extension Status**: Upon successful launch of the extension, the [status bar](#how-to-trigger-the-test-run) shows the run status for the active folder, and the aggregated test status for the whole workspace. Clicking on each status reveals the associated output window.
137127

138128
## How To?
139129
### How to set up the extension?
@@ -283,12 +273,12 @@ useDashedArgs| Determine if to use dashed arguments for jest processes |undefine
283273
|**UX**|
284274
|[outputConfig](#outputconfig) 💼|Controls test output experience across the whole workspace.|undefined|`"jest.outputConfig": "neutral"` or `"jest.outputConfig": {"revealOn": "run", "revealWithFocus": "terminal", "clearOnRun": 'terminal"`| >= v6.1.0
285275
|[runMode](#runmode)|Controls most test UX, including when tests should be run, output management, etc|undefined|`"jest.runMode": "watch"` or `"jest.runMode": "on-demand"` or `"jest.runMode": {"type": "on-demand", "deferred": true}`| >= v6.1.0
286-
|:x: autoClearTerminal|Clear the terminal output at the start of any new test run.|false|`"jest.autoClearTerminal": true`| >= v6.0.0 < 6.1 (replaced by outputConfig)
276+
|:x: autoClearTerminal|Clear the terminal output at the start of any new test run.|false|`"jest.autoClearTerminal": true`| v6.0.0 (replaced by outputConfig)
287277
|:x: [testExplorer](#testexplorer) |Configure jest test explorer|null|`{"showInlineError": "true"}`| < 6.1.0 (replaced by runMode)
288-
|:x: [autoRun](#autorun)|Controls when and what tests should be run|undefined|`"jest.autoRun": "off"` or `"jest.autoRun": "watch"` or `"jest.autoRun": {"watch": false, "onSave":"test-only"}`| <= v6.1.0 (replaced by runMode)
289-
|:x: [autoRevealOutput](#autoRevealOutput)|Determine when to show test output|"on-run"|`"jest.autoRevealOutput": "on-exec-error"`| <= v6.1.0 (replaced by outputConfig)
278+
|:x: [autoRun](#autorun)|Controls when and what tests should be run|undefined|`"jest.autoRun": "off"` or `"jest.autoRun": "watch"` or `"jest.autoRun": {"watch": false, "onSave":"test-only"}`| < v6.1.0 (replaced by runMode)
279+
|:x: [autoRevealOutput](#autoRevealOutput)|Determine when to show test output|"on-run"|`"jest.autoRevealOutput": "on-exec-error"`| < v6.1.0 (replaced by outputConfig)
290280
|**Coverage**|
291-
|:x: showCoverageOnLoad|Show code coverage when extension starts|false|`"jest.showCoverageOnLoad": true`| <= v6.1.0 (replaced by runMode)
281+
|:x: showCoverageOnLoad|Show code coverage when extension starts|false|`"jest.showCoverageOnLoad": true`| < v6.1.0 (replaced by runMode)
292282
|[coverageFormatter](#coverageFormatter)|Determine the coverage overlay style|"DefaultFormatter"|`"jest.coverageFormatter": "GutterFormatter"`|
293283
|[coverageColors](#coverageColors)|Coverage indicator color override|undefined|`"jest.coverageColors": { "uncovered": "rgba(255,99,71, 0.2)", "partially-covered": "rgba(255,215,0, 0.2)"}`|
294284
|**Misc**|
@@ -484,6 +474,7 @@ interface JestRunModeOptions {
484474
runAllTestsOnStartup?: boolean;
485475
coverage?: boolean;
486476
deferred?: boolean;
477+
showInlineError?: boolean;
487478
}
488479
export type JestRunMode = JestRunModeOptions & (
489480
| { type: 'watch' }
@@ -567,7 +558,7 @@ While the concepts of performance and automation are generally clear, "completen
567558

568559
**Migration Guide**
569560
<a id="runmode-migration"></a>
570-
Starting from v6.1.0, if no runMode is defined in settings.json, the extension will automatically generate one using legacy settings (`autoRun`, `autoRevealOutput`, `showCoverageOnLoad`). To migrate, simply use the `"Jest: Save Current RunMode"` command from the command palette to update the setting, then remove the deprecated settings.
561+
Starting from v6.1.0, if no runMode is defined in settings.json, the extension will automatically generate one using legacy settings (`autoRun`, `showCoverageOnLoad`). To migrate, simply use the `"Jest: Save Current RunMode"` command from the command palette to update the setting, then remove the deprecated settings.
571562

572563
---
573564

@@ -659,6 +650,11 @@ There are 2 ways to change autoRun:
659650
---
660651

661652
#### testExplorer
653+
654+
<div style="background-color: yellow; color: black; padding: 10px; border-radius: 5px;">
655+
As of v6.1.0, this setting has been folded into <a href="#runmode">runMode</a>. For transition details, please refer to the <a href="#runmode-migration">runMode migration</a>.
656+
</div>
657+
662658
```ts
663659
testExplorer = {showInlineError?: boolean}
664660
```
@@ -701,7 +697,7 @@ Default is `"jest.monitorLongRun":60000` (1 minute)
701697

702698
#### autoRevealOutput
703699
<div style="background-color: yellow; color: black; padding: 10px; border-radius: 5px;">
704-
As of v6.1.0, <a href="#runmode">runMode</a> has superseded autoRevealOutput. For transition details, please refer to the <a href="#runmode-migration">runMode migration</a>.
700+
As of v6.1.0, this setting has been folded into <a href="#runmode">runMode</a>. For transition details, please refer to the <a href="#runmode-migration">runMode migration</a>.
705701
</div>
706702

707703
```ts

images/interface-6.1.0.png

495 KB
Loading

release-notes/release-note-v6.md

Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,22 @@
22

33
Release Notes
44
---
5+
56
- [Release Notes](#release-notes)
6-
- [v6.0.0 (pre-release)](#v600-pre-release)
7+
- [v6.1.0 (pre-release)](#v610-pre-release)
78
- [Main Features](#main-features)
9+
- [1. Enhanced Test Execution Control with "runMode"](#1-enhanced-test-execution-control-with-runmode)
10+
- [1.1 The "deferred" mode](#11-the-deferred-mode)
11+
- [1.2 Configuration and Examples](#12-configuration-and-examples)
12+
- [1.3 Deprecations and Migrations](#13-deprecations-and-migrations)
13+
- [2. Support VSCode "TEST RESULTS" Panel with "jest.outputConfig"](#2-support-vscode-test-results-panel-with-jestoutputconfig)
14+
- [2.1 "TEST RESULTS" Panel Integration](#21-test-results-panel-integration)
15+
- [2.2 Configuration and Examples](#22-configuration-and-examples)
16+
- [2.3 Deprecations and Migration](#23-deprecations-and-migration)
17+
- [Bug Fixes](#bug-fixes)
18+
- [Technical Debt](#technical-debt)
19+
- [v6.0.0 (pre-release)](#v600-pre-release)
20+
- [Main Features](#main-features-1)
821
- [1. Virtual Folders](#1-virtual-folders)
922
- [2. Support spawning jest with dashed arguments](#2-support-spawning-jest-with-dashed-arguments)
1023
- [3. control extension activation within each folder](#3-control-extension-activation-within-each-folder)
@@ -14,6 +27,134 @@ Release Notes
1427

1528
---
1629

30+
## v6.1.0 (pre-release)
31+
32+
This release introduces a more streamlined ["jest.runMode"](https://github.com/jest-community/vscode-jest#runmode) setting to boost test execution efficiency, coupled with the integration of the "TEST RESULTS" panel via the new ["jest.outputConfig"](https://github.com/jest-community/vscode-jest#outputconfig) for a consistent test results display. These enhancements should simplify the transition for newcomers and also improve startup times for larger projects, while offering more control over test output visibility.
33+
34+
While we aim for backward compatibility, the nature of the advancements may not align seamlessly with all existing configurations. Users are advised to refer to the Migration Guide provided for each feature to ensure a smooth transition.
35+
36+
As with any pre-release, your feedback is invaluable to us. If you encounter any unexpected behavior or have suggestions for improvement, do not hesitate to report it [here](https://github.com/jest-community/vscode-jest/issues).
37+
38+
39+
### Main Features
40+
#### 1. Enhanced Test Execution Control with "runMode"
41+
42+
https://github.com/jest-community/vscode-jest/assets/891093/9bd4e414-b7aa-43f1-bc89-ffaf30959fe0
43+
44+
Replacing `jest.autoRun` and related settings, the new `runMode` configuration simplifies the test execution process, resolves confusion for newcomers, and introduces more efficient workflows with modes like "deferred."
45+
46+
##### 1.1 The "deferred" mode
47+
The "deferred" mode addresses startup performance, particularly for large projects, by postponing preparation tasks until the first test run or until the user disables deferred mode.
48+
49+
##### 1.2 Configuration and Examples
50+
`"jest.runMode"` offers flexible configurations, allowing for both predefined modes and detailed customization. Here are some configuration examples:
51+
```json
52+
// for "on-demand" runMode
53+
{
54+
"jest.runMode": "on-demand"
55+
}
56+
57+
// for "on-demand" and deferred: the most light-weight startup
58+
{
59+
"jest.runMode": {
60+
"type": "on-demand",
61+
"deferred": true
62+
}
63+
}
64+
65+
// watch mode with coverage and startup full run: the most complete setup
66+
{
67+
"jest.runMode": {
68+
"type": "watch",
69+
"runAllTestsOnStartup": true,
70+
"coverage": true
71+
}
72+
}
73+
74+
// on-save mode for test file only and show inline error
75+
{
76+
"jest.runMode": {
77+
"type": "on-save",
78+
"testFileOnly": true,
79+
"showInlineError": true
80+
}
81+
}
82+
```
83+
Detailed explanations and more examples are available in the [RunMode](https://github.com/jest-community/vscode-jest#runmode).
84+
85+
##### 1.3 Deprecations and Migrations
86+
The following settings have been consolidated into `runMode` and will be removed in the future release:
87+
88+
- "jest.autoRun"
89+
- "jest.showCoverageOnLoad"
90+
- "TestExplorer"
91+
92+
For a smooth transition, users should migrate to the new `runMode`` setting. Assistance with migration is provided by the `"Jest: Save Current RunMode"`` command in the command palette. Complete migration steps can be found in the [RunMode Migration Guide](https://github.com/jest-community/vscode-jest#runmode-migration).
93+
94+
#### 2. Support VSCode "TEST RESULTS" Panel with "jest.outputConfig"
95+
96+
https://github.com/jest-community/vscode-jest/assets/891093/6b2fa5b6-8790-493a-803a-4cddbce05ccd
97+
98+
The extension now supports the display of test results in VSCode's "TEST RESULTS" panel, complementing the traditional output in the integrated TERMINAL, through a new `"jest.outputConfig"` setting. This allows for a simple and consistent control over both panels.
99+
100+
##### 2.1 "TEST RESULTS" Panel Integration
101+
102+
The VSCode "TEST RESULTS" panel is controlled by a native `"testing.openTesting"` setting, which might not align with the extension's settings. To avoid conflicts, you may set `"testing.openTesting"` to `"neverOpen"` if you prefer this extension to handle the panel behavior through the new `"jest.outputConfig"` setting. More detailed explanation can be found in the [Handling Conflict](https://github.com/jest-community/vscode-jest#outputconfig-conflict) section.
103+
104+
##### 2.2 Configuration and Examples
105+
106+
We've introduced the `"jest.outputConfig"` setting to give users comprehensive control over the test output behavior across TERMINAL and TEST RESULTS panels, moving to a workspace-level setting for broader applicability.
107+
108+
Here are a few scenarios and how to configure them:
109+
110+
```json
111+
// Minimal interaction, suitable for watch/on-save modes
112+
{
113+
"testing.openTesting": "neverOpen",
114+
"jest.outputConfig": "neutral"
115+
}
116+
117+
// Auto-focus on "TEST RESULTS" when errors occur, ideal for on-demand testing
118+
{
119+
"testing.openTesting": "neverOpen",
120+
"jest.outputConfig": {
121+
"revealOn": "error",
122+
"revealWithFocus": "test-results"
123+
}
124+
}
125+
126+
// Terminal-focused output with clean start for each run, preferred for on-demand mode
127+
{
128+
"testing.openTesting": "neverOpen",
129+
"jest.outputConfig": {
130+
"revealWithFocus": "terminal",
131+
"clearOnRun": "terminal"
132+
}
133+
}
134+
```
135+
For more detailed examples and explanations, refer to the [OutputConfig](https://github.com/jest-community/vscode-jest#outputconfig).
136+
137+
##### 2.3 Deprecations and Migration
138+
139+
The following settings have been consolidated into `outputConfig` and will be removed in the future release:
140+
- `"jest.autoRevealOutput"`
141+
- `"jest.autoClearTerminal"`
142+
143+
To migrate, use the `"Jest: Save Current Output Config"` command, and then manually adjust your "settings.json" as needed. If any conflicts arise, the extension will guide you through resolving them.
144+
145+
For a step-by-step migration process, see the [OutputConfig Migration Guide](https://github.com/jest-community/vscode-jest#outputconfig-migration).
146+
147+
148+
### Bug Fixes
149+
- Fixed an issue where the virtual folder `rootPath` was not resolved correctly for folder test items, causing test runs or debugging to fail. ([#1080](https://github.com/jest-community/vscode-jest/pull/1080) - @akwodkiewicz)
150+
- Resolved a matching problem during manual test runs where a non-exact match led to more tests being run than specified. ([#1091](https://github.com/jest-community/vscode-jest/pull/1091) - @connectdotz)
151+
- Corrected the status recording for running `".each"` test/describe blocks which sometimes did not reflect accurately. ([#1092](https://github.com/jest-community/vscode-jest/pull/1092) - @connectdotz)
152+
153+
### Technical Debt
154+
- Updated the CI node version check to now include versions 18 through 20, ensuring compatibility with the latest node releases. ([#1088](https://github.com/jest-community/vscode-jest/pull/1088) - @connectdotz)
155+
- Upgraded tooling dependencies to their latest versions to improve development workflows and bring in new features and bug fixes from those tools. ([#1089](https://github.com/jest-community/vscode-jest/pull/1089) - @connectdotz)
156+
157+
17158
## v6.0.0 (pre-release)
18159

19160
This major release introduces the 'Virtual Folders' feature. Much like a VSCode workspace folder, a 'Virtual Folder' allows you to manage a custom Jest runtime environment, each configurable with its own resource-level settings. This is particularly useful for projects with multiple Jest configurations or monorepo structures. While we've ensured backward compatibility, the introduction of 'Virtual Folders' involved significant internal changes that prompted a major version bump.

0 commit comments

Comments
 (0)