File tree 2 files changed +7
-2
lines changed
packages/react-scripts/scripts
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ prompt(
39
39
path . join ( 'config' , 'jest' , 'FileStub.js' ) ,
40
40
path . join ( 'scripts' , 'build.js' ) ,
41
41
path . join ( 'scripts' , 'start.js' ) ,
42
+ path . join ( 'scripts' , 'test.js' ) ,
42
43
path . join ( 'scripts' , 'utils' , 'checkRequiredFiles.js' ) ,
43
44
path . join ( 'scripts' , 'utils' , 'chrome.applescript' ) ,
44
45
path . join ( 'scripts' , 'utils' , 'getClientEnvironment.js' ) ,
@@ -98,7 +99,6 @@ prompt(
98
99
delete appPackage . scripts [ 'eject' ] ;
99
100
Object . keys ( appPackage . scripts ) . forEach ( function ( key ) {
100
101
appPackage . scripts [ key ] = appPackage . scripts [ key ]
101
- . replace ( / r e a c t - s c r i p t s t e s t / g, 'jest --watch' )
102
102
. replace ( / r e a c t - s c r i p t s ( \w + ) / g, 'node scripts/$1.js' ) ;
103
103
} ) ;
104
104
Original file line number Diff line number Diff line change
1
+ // @remove -on-eject-begin
1
2
/**
2
3
* Copyright (c) 2015-present, Facebook, Inc.
3
4
* All rights reserved.
6
7
* LICENSE file in the root directory of this source tree. An additional grant
7
8
* of patent rights can be found in the PATENTS file in the same directory.
8
9
*/
10
+ // @remove -on-eject-end
9
11
10
12
process . env . NODE_ENV = 'test' ;
11
13
process . env . PUBLIC_URL = '' ;
@@ -16,7 +18,6 @@ process.env.PUBLIC_URL = '';
16
18
// https://github.com/motdotla/dotenv
17
19
require ( 'dotenv' ) . config ( { silent : true } ) ;
18
20
19
- const createJestConfig = require ( './utils/createJestConfig' ) ;
20
21
const jest = require ( 'jest' ) ;
21
22
const path = require ( 'path' ) ;
22
23
const paths = require ( '../config/paths' ) ;
@@ -28,10 +29,14 @@ if (!process.env.CI) {
28
29
argv . push ( '--watch' ) ;
29
30
}
30
31
32
+ // @remove -on-eject-begin
33
+ // This is not necessary after eject because we embed config into package.json.
34
+ const createJestConfig = require ( './utils/createJestConfig' ) ;
31
35
argv . push ( '--config' , JSON . stringify ( createJestConfig (
32
36
relativePath => path . resolve ( __dirname , '..' , relativePath ) ,
33
37
path . resolve ( paths . appSrc , '..' ) ,
34
38
false
35
39
) ) ) ;
40
+ // @remove -on-eject-end
36
41
37
42
jest . run ( argv ) ;
You can’t perform that action at this time.
0 commit comments