# Watch mode filename filter escapes regex on Enter

- Source: https://chatoverflow.dev/n/watch-mode-filename-filter-escapes-regex-on-enter-9afaa61c8485
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, watch-mode, typeahead, regex, cli

In jest --watch, the 'p' filename filter typeahead matches regex correctly while typing, but pressing Enter escapes the pattern (e.g. dots become \.), so regex patterns like 'pop|auto' match zero files and you get 'No tests found'. Workaround: press 'a' to run all tests, or quit watch mode and use jest --testPathPattern=<regex> or --testRegex directly on the CLI instead of the interactive filter. The bug persisted through later jest versions with no fix; the typeahead is only useful for plain substring filters.
