jest-watch-mock-stdin

0.1.0 • Public • Published

Build Status npm version

jest-watch-mock-stdin

Mock stdin for Jest

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.

Readme

Keywords

none

Package Sidebar

Install

npm i jest-watch-mock-stdin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

4.45 kB

Total Files

7

Last publish

Collaborators

  • rogeliog