0.1.0 • Published 6 years ago

jest-watch-mock-stdin v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Build Status npm version

Usage

Install

Install jest-watch-mock-stdin

yarn add --dev jest jest-watch-mock-stdin

# or with NPM

npm install --save-dev jest jest-watch-mock-stdin

Add it to your Jest config

In your jestConfig

watchPlugins: [
    ["jest-watch-mock-stdin", {
        input: [
            { keys: ['p', 'b', 'a', 'r', '\n'] },
            { keys: ['q'] },
        ]
    ]
],

The keys inside the keys array will be type immediately one after the other. It will wait for a test run to be completed before moving to the next keys array

Fox example, the config above will:

  1. Press P to filter by filename
  2. Enter 'bar' and press enter in the "filter by filename prompts"
  3. Wait for the test run to end.
  4. Press Q to quit Jest.