1. jest-watch-select-projects
An experimental ESLint runner for Jest
jest-watch-select-projects
Package: jest-watch-select-projects
Created by: rogeliog
Last modified: Fri, 06 May 2022 12:50:27 GMT
Version: 2.0.0
License: MIT
Downloads: 959,115
Repository: https://github.com/rogeliog/jest-watch-select-projects

Install

npm install jest-watch-select-projects
yarn add jest-watch-select-projects

Build Status npm version

jest-watch-select-projects

Select which Jest project to run

select-project

Usage

Install

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

 yarn add --dev jest jest-watch-select-projects

# or with NPM

npm install --save-dev jest jest-watch-select-projects

Add it to your Jest config

In your package.json

 {
  "jest": {
    "watchPlugins": ["jest-watch-select-projects"]
  }
}

Or in jest.config.js

 module.exports = {
  watchPlugins: ['jest-watch-select-projects'],
};

Configuring your key and prompt name

 module.exports = {
  watchPlugins: [
    [
      'jest-watch-select-projects',
      {
        key: 'X',
        // function or string
        prompt() {
          const activeProjectsText = this._getActiveProjectsText();
          return 'do something with my custom prompt';
        },
      },
    ],
  ],
};

Run Jest in watch mode

 yarn jest --watch

FAQ

Why is this running all of my projects?

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin