jest-watch-directories

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i jest-watch-directories

Weekly Downloads

2,326

Version

1.1.0

License

MIT

Unpacked Size

4.57 kB

Total Files

4

Last publish

Collaborators

  • cameronhunter