-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract typeahead printing logic * Handle escape when in typeahead * Add tests and highlight * Update Flow and fix flow errors. * Improve printing of test paths. * Polish * Fix node 4 CI * Reset pattern state if FS changes * Only instantiate searchSource once * Clear screen when entering typeahead * Show "pattern mode" and clear screen
- Loading branch information
Showing
13 changed files
with
565 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
239 changes: 239 additions & 0 deletions
239
packages/jest-cli/src/__tests__/__snapshots__/watch-pattern-mode-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,239 @@ | ||
exports[`Watch mode flows Pressing "P" enters pattern mode 1`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 11 files. | ||
› path/to/file1-test.js | ||
› path/to/file2-test.js | ||
› path/to/file3-test.js | ||
› path/to/file4-test.js | ||
› path/to/file5-test.js | ||
› path/to/file6-test.js | ||
› path/to/file7-test.js | ||
› path/to/file8-test.js | ||
› path/to/file9-test.js | ||
› path/to/file10-test.js | ||
› and 1 more file | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 2`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p. | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 11 files. | ||
› path/to/file1-test.js | ||
› path/to/file2-test.js | ||
› path/to/file3-test.js | ||
› path/to/file4-test.js | ||
› path/to/file5-test.js | ||
› path/to/file6-test.js | ||
› path/to/file7-test.js | ||
› path/to/file8-test.js | ||
› path/to/file9-test.js | ||
› path/to/file10-test.js | ||
› and 1 more file | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 3`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.* | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 11 files. | ||
› path/to/file1-test.js | ||
› path/to/file2-test.js | ||
› path/to/file3-test.js | ||
› path/to/file4-test.js | ||
› path/to/file5-test.js | ||
› path/to/file6-test.js | ||
› path/to/file7-test.js | ||
› path/to/file8-test.js | ||
› path/to/file9-test.js | ||
› path/to/file10-test.js | ||
› and 1 more file | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 4`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.*1 | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 3 files. | ||
› path/to/file1-test.js | ||
› path/to/file10-test.js | ||
› path/to/file11-test.js | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 5`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.*10 | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 1 file. | ||
› path/to/file10-test.js | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 6`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.*1 | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 3 files. | ||
› path/to/file1-test.js | ||
› path/to/file10-test.js | ||
› path/to/file11-test.js | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 7`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.* | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 11 files. | ||
› path/to/file1-test.js | ||
› path/to/file2-test.js | ||
› path/to/file3-test.js | ||
› path/to/file4-test.js | ||
› path/to/file5-test.js | ||
› path/to/file6-test.js | ||
› path/to/file7-test.js | ||
› path/to/file8-test.js | ||
› path/to/file9-test.js | ||
› path/to/file10-test.js | ||
› and 1 more file | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; | ||
|
||
exports[`Watch mode flows Pressing "P" enters pattern mode 8`] = ` | ||
"[MOCK - cursorHide] | ||
[MOCK - clearScreen] | ||
Pattern Mode Usage | ||
› Press ESC to exit pattern mode. | ||
pattern › p.*3 | ||
[MOCK - cursorSavePosition] | ||
Pattern matches 1 file. | ||
› path/to/file3-test.js | ||
[MOCK - cursorRestorePosition] | ||
[MOCK - cursorShow]" | ||
`; |
Oops, something went wrong.