File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 16
16
],
17
17
"scripts" : {
18
18
"test" : " jest" ,
19
- "pretest:ci" : " npm uninstall jest babel-jest && npm install jest@$JEST_VERSION babel-jest@$JEST_VERSION --no-save " ,
19
+ "pretest:ci" : " npm uninstall jest babel-jest && npm install jest@$JEST_VERSION" ,
20
20
"test:ci" : " jest --ci"
21
21
},
22
22
"dependencies" : {
23
- "jest-config" : " ^24.0.0" ,
24
23
"jest-validate" : " ^24.0.0" ,
25
24
"mkdirp" : " ^0.5.1" ,
26
25
"strip-ansi" : " ^4.0.0" ,
27
26
"xml" : " ^1.0.1"
28
27
},
29
28
"devDependencies" : {
30
- "babel-jest" : " ^24.0.0" ,
31
29
"jest" : " ^24.0.0" ,
32
30
"libxmljs" : " ^0.18.4"
33
31
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const fs = require('fs');
5
5
6
6
const constants = require ( '../constants/index' ) ;
7
7
8
- const { replaceRootDirInPath } = require ( 'jest-config ' ) ;
8
+ const { replaceRootDirInPath } = require ( './replaceRootDirInPath ' ) ;
9
9
10
10
function getEnvOptions ( ) {
11
11
const options = { } ;
Original file line number Diff line number Diff line change
1
+ // Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
2
+ // in order to reduce incompatible jest dependencies
3
+
4
+ const path = require ( 'path' ) ;
5
+
6
+ module . exports = {
7
+ replaceRootDirInPath : (
8
+ rootDir ,
9
+ filePath ,
10
+ ) => {
11
+ if ( ! / ^ < r o o t D i r > / . test ( filePath ) ) {
12
+ return filePath ;
13
+ }
14
+
15
+ return path . resolve (
16
+ rootDir ,
17
+ path . normalize ( './' + filePath . substr ( '<rootDir>' . length ) ) ,
18
+ ) ;
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments