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 1616 ],
1717 "scripts" : {
1818 "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" ,
2020 "test:ci" : " jest --ci"
2121 },
2222 "dependencies" : {
23- "jest-config" : " ^24.0.0" ,
2423 "jest-validate" : " ^24.0.0" ,
2524 "mkdirp" : " ^0.5.1" ,
2625 "strip-ansi" : " ^4.0.0" ,
2726 "xml" : " ^1.0.1"
2827 },
2928 "devDependencies" : {
30- "babel-jest" : " ^24.0.0" ,
3129 "jest" : " ^24.0.0" ,
3230 "libxmljs" : " ^0.18.4"
3331 }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const fs = require('fs');
55
66const constants = require ( '../constants/index' ) ;
77
8- const { replaceRootDirInPath } = require ( 'jest-config ' ) ;
8+ const { replaceRootDirInPath } = require ( './replaceRootDirInPath ' ) ;
99
1010function getEnvOptions ( ) {
1111 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