Skip to content

v4.0.0 (May 9, 2021)

Compare
Choose a tag to compare
@connectdotz connectdotz released this 09 May 23:38
· 169 commits to master since this release
90bf0b0

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.
  • 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.
  • 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"
  • 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 jest@26.5.0.

Recommanded

  • Migrate to "jest.jestCommandLine" if you have jest.pathToJest or jest.pathToConfig customized.
  • Migrate to "jest.autoRun" if you have customized "jest.autoEnable" or "jest. runAllTestsFirst"

Contributors 馃檹

@stephtr, @lordofthelake, @connectdotz, @glentakahashi, @Tymek, @johnnyreilly