Skip to content

Commit

Permalink
Fix interactive watch arrow selection on Windows #3516
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Ranger committed May 8, 2017
1 parent 2f2f898 commit 832822a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/jest-cli/src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const chalk = require('chalk');
const createContext = require('./lib/createContext');
const HasteMap = require('jest-haste-map');
const isCI = require('is-ci');
const os = require('os');
const isInteractive = process.stdout.isTTY && !isCI;
const isValidPath = require('./lib/isValidPath');
const preRunMessage = require('./preRunMessage');
Expand Down Expand Up @@ -200,6 +201,10 @@ const watch = (
case KEYS.P:
testPathPatternPrompt.run(
testPathPattern => {
if (os.platform() === 'win32') {
testPathPattern = testPathPattern.replace(/\//g, '\\\\')
}

updateArgv(argv, 'watch', {
testNamePattern: '',
testPathPattern,
Expand Down

0 comments on commit 832822a

Please sign in to comment.