jest-watch-directories

A Jest watch plugin to select directories to test

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
jest-watch-directories
1.1.04 years ago4 years agoMinified + gzip package size for jest-watch-directories in KB

Readme

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.