File tree 1 file changed +12
-0
lines changed
packages/react-scripts/scripts
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,18 @@ if (!process.env.CI && argv.indexOf('--coverage') < 0) {
26
26
argv . push ( '--watch' ) ;
27
27
}
28
28
29
+ // A temporary hack to clear terminal correctly.
30
+ // You can remove this after updating to Jest 18 when it's out.
31
+ // https://github.com/facebook/jest/pull/2230
32
+ var realWrite = process . stdout . write ;
33
+ var CLEAR = process . platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H' ;
34
+ process . stdout . write = function ( chunk , encoding , callback ) {
35
+ if ( chunk === '\x1B[2J\x1B[H' ) {
36
+ chunk = CLEAR ;
37
+ }
38
+ return realWrite . call ( this , chunk , encoding , callback ) ;
39
+ } ;
40
+
29
41
// @remove -on-eject-begin
30
42
// This is not necessary after eject because we embed config into package.json.
31
43
const createJestConfig = require ( '../utils/createJestConfig' ) ;
You can’t perform that action at this time.
0 commit comments