v4.0.0 (May 9, 2021)
This is the official v4 release (finally! 😄)
There are a lot of changes in this release. We will list the major features/changes below, more detail can be found in CHANGELOG
Release Summary
- move the test status indicators to the gutter so they won't interfere with source code formatting.
- migrating to the position-based test block <-> test result matching algorithm so we can better support dynamic test names, such as parameterized tests and template literal strings names.
- fully support parameterized tests, including all syntax variants, and allowing select the specific parameter for debugging. (Please note this requires minimal jest version >= 26.5.0)
- addressed a few code coverage issues and added color customization "jest.CoverageColor"
- introduce a "setup wizard" to help people unable to get their test running through this extension.
- a new command
Jest: Setup Extension
is added.
- a new command
- introduce an "interactive mode", in addition to the default "watch" mode, to control what and when tests should be executed and enable "on-demand" file-based test runs. This should help people with many or resource-intensive tests to avoid the dreaded high CPU due to watcher running the related tests upon changes.
- A new setting "jest.autoRun" is introduced to control the runner mode. This will supercede
"jest.autoEnable"
and"jest. runAllTestsFirst"
. If you have these settings, please consider migrate. - New commands and editor context menu are added to facilitate the "on-demand" test run.
- Enhanced status bar display to show the whole workspace test state. In addition to the "success" and "failure" status, it also shows "unknown" indicating the number of tests that haven't been run yet, especially useful for the interactive mode.
- A new setting "jest.autoRun" is introduced to control the runner mode. This will supercede
- introduced the new setting "jest.jestCommandLine" that supercedes
jest.pathToJest
+jest.pathToConfig
, which will be deprecated in the future versions. - Removed "Jest: Restart Runner" command. The "Jest: Start Runner" will restart the runner if one is already running.
- Updated README so the community can better self-help.
- the internal process management model is rewritten to support the interactive mode and the upcoming vscode test framework.
- Updating snapshot no longer requires restarting the jest runner, i.e. no need for
"jest.restartJestOnSnapshotUpdate"
- Updating snapshot no longer requires restarting the jest runner, i.e. no need for
- many internal code-base cleanup, refactoring, and modernization to hopefully make future development of this extension easier and more fun 😄
Migration Guide
Required
- Please ensure your project has jest version >= 26.5.0 if you have, or plan to use, parameterized tests. See "Location for test.each results is always 42,9" (jestjs/jest#10412), which was fixed in [email protected].
Recommanded
- Migrate to
"jest.jestCommandLine"
if you havejest.pathToJest
orjest.pathToConfig
customized. - Migrate to
"jest.autoRun"
if you have customized"jest.autoEnable"
or"jest. runAllTestsFirst"
Contributors 🙏
@stephtr, @lordofthelake, @connectdotz, @glentakahashi, @Tymek, @johnnyreilly