Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jest-watch-typeahead

jest-community16.3mMIT2.2.2

Jest plugin for filtering by filename or test name

readme

Build Status npm version

jest-watch-typeahead

Filter your tests by file name or test name

watch

Usage

Install

Install jest(it needs Jest 27+) and jest-watch-typeahead

yarn add --dev jest jest-watch-typeahead

# or with NPM

npm install --save-dev jest jest-watch-typeahead

Add it to your Jest config

In your package.json

{
  "jest": {
    "watchPlugins": [
      "jest-watch-typeahead/filename",
      "jest-watch-typeahead/testname"
    ]
  }
}

Or in jest.config.js

module.exports = {
  watchPlugins: [
    'jest-watch-typeahead/filename',
    'jest-watch-typeahead/testname',
  ],
};

Configuring your key and prompt name

module.exports = {
  watchPlugins: [
    [
      'jest-watch-typeahead/filename',
      {
        key: 'k',
        prompt: 'do something with my custom prompt',
      },
    ],
  ],
};

Run Jest in watch mode

yarn jest --watch

changelog

2.2.2 (2023-01-24)

Bug Fixes

2.2.1 (2022-11-16)

Bug Fixes

  • deps: update dependency ansi-escapes to v6 (#183) (8e9713b)
  • deps: update dependency slash to v5 (#186) (726f0d1)

2.2.0 (2022-09-10)

Features

  • deps: update jest monorepo to v29 (major) (#175) (05f98ac)

2.1.1 (2022-08-25)

Bug Fixes

2.1.0 (2022-08-25)

Features

  • add support for Jest 29 (bebd216)

2.0.0 (2022-07-09)

Bug Fixes

  • deps: update dependency ansi-escapes to v5 (#87) (b990d44)
  • drop support for Node 12 and 17 (0f4b1b6)

BREAKING CHANGES

  • Drop Node 12 and Node 17

1.1.0 (2022-04-25)

Features

  • deps: add Jest 28 to peer dependency range (#142) (17a0f8d)

1.0.0 (2021-09-29)

Bug Fixes

  • add exports field to package.json (#86) (1bcd08f)
  • drop support for EOL versions of node (#85) (7351933)

Features

BREAKING CHANGES

  • Drop support for Jest v26
  • Module is now written in native ESM
  • Disallow importing internal files
  • Supported version range of node is now ^12.22.0 || ^14.17.0 || >=16.0.0

0.6.5 (2021-09-28)

Bug Fixes

  • remove test files from published module (db522ac)

0.6.4 (2021-05-27)

Bug Fixes

  • deps: update jest peer dependency to accept v27 (#59) (6552ead)

0.6.2

Fixes

  • Use correct highlight offset even when rootDir is not root package directory (#34)

0.6.1

Fixes

  • Provide exact pattern for selected test names

0.6.0

Chore & Maintenance

  • Update dependencies and drop Node 8 (#35)

0.5.0

Chore & Maintenance

  • Update dependencies

0.4.2

Fixes

  • Fix issue with overly trimmed basenames when formatting test paths (#33)

0.4.1

Fixes

  • Allow selecting tests and files containing regexp special characters (#32)

Chore & Maintenance

  • Remove build directory before building (#31)

0.4.0

Chore & Maintenance

  • Update dependencies and drop Node 6 (#30)

0.3.1

Fixes

  • Helpful error message when attempting to use the package main file (#29)

0.3.0

Chore & Maintenance

  • Bump dated dependencies (#25)
  • Get better truncation for testname typeahead by truncating the start and not the end (#28)

Fixes

  • Use fullName(to show ancestor titles) for test name pattern plugin (#26)

0.2.1

  • Fix cursor in terminal app (#21)

Chore & Maintenance

  • Bump dated dependencies (#23)

0.2.0

Features

  • Add support for plugin config (#13)

Fixes

  • Make matching case insensitive (#18)
  • fix: migrate to use jest-watcher (#6)

Chore & Maintenance

  • Upgrade Prettier to 1.13.7 (#17)
  • New directory structure (#14)
  • Move ansi-escapes to dependencies 23f22d4
  • Setup Travis and add tests (#12)

0.1.0

Features

  • Add test name typeahead (#1)
  • Rename to jest-watch-typeahead

0.0.1

Initial Release