Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

Bumps [npm-registry-fetch](https://github.com/npm/registry-fetch) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/npm/registry-fetch/releases)
- [Changelog](https://github.com/npm/npm-registry-fetch/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/registry-fetch/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7e0013f

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

jest-watch-suspend

NPM version NPM downloads Mentioned in Awesome Jest

Circle CI Travis CI Codecov Coveralls Status

Greenkeeper Semantic Release

Visual Studio Code Wallaby.js

Pausing/resuming jest watch mode.

Requires jest@23+.

Usage

To use jest-watch-suspend, add it to the watchPlugins section of the Jest configuration:

{
  "jest": {
    "watchPlugins": [
      // default
      "jest-watch-suspend",
      // configure
      [
        "jest-watch-suspend", {
          // override key press
          "key": "s",
          // override prompt
          "prompt": "suspend watch mode",
          // starts in suspend mode
          "suspend-on-start": true
        }
      ]
    ]
  }
}

Use Cases

Suspend on start:

  • (suspended) ➣ [p] + <filter> | [t] + <filter>[s] (resume)

Setup both path and name filter before running tests:

  • [s] (suspend) ➣ [p] + <filter> & [t] + <filter>[s] (resume)

Change multiple files before running tests:

  • [s] (suspend) ➣ multiple changes and file saves ➣ [s] (resume)

Run code coverage after running some test.only() tests:

  • [s] (suspend) ➣ change test.only() back to test() & [e] (with jest-watch-toggle-config) ➣ [s] (resume)