1.1.0 • Published 6 years ago

jest-watch-directories v1.1.0

Weekly downloads
3,066
License
MIT
Repository
-
Last release
6 years ago

jest-watch-directories npm version

A Jest watch plugin to select which directories to test.

Usage

Install

Install jest (it needs Jest 23+) and jest-watch-directories

yarn add --dev jest jest-watch-directories

# or with NPM

npm install --save-dev jest jest-watch-directories

Add it to your Jest config

In your package.json

{
  "jest": {
    "watchPlugins": [
      ["jest-watch-directories", { "directories": ["packages/*"] }]
    ]
  }
}

Or in jest.config.js

module.exports = {
  watchPlugins: [
    ['jest-watch-directories', { directories: ['packages/*'] }]
  ]
};

Run Jest in watch mode

yarn jest --watch

FAQ

Why is this not filtering my directories?

Make certain that you're using the SPACE key to toggle the selected state of directories and the ENTER key to confirm your settings.