Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix require paths for config-yargs, convert-argv, SearchSource and createContext #45

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
webpack-1
node_modules/
.cache/
.vscode
fixtures/**/.cache
7 changes: 5 additions & 2 deletions fixtures/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ const itTests = (files) => result => {

const itSkips = (files) => result => {
files.forEach(file => (
expect(result.stderr)
.not.toMatch(file)
expect(
result.stderr.indexOf(file) === -1 || // filename is NOT present in stderr
result.stderr.indexOf(`skipped tests ${file}`) !== -1 // "skipped test" with filename IS present in stderr
)
.toBeTruthy()
));
return result;
};
Expand Down
6 changes: 4 additions & 2 deletions jest-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ function run(argv, webpackConfig) {
var webpackYargs = require('yargs/yargs')([]);
tryRequire(
function() {return require('webpack/bin/config-yargs');},
function() {return require('webpack-cli/bin/config-yargs');}
function() {return require('webpack-cli/bin/config-yargs');},
function() {return require('webpack-cli/bin/config/config-yargs');}
)(webpackYargs);
var webpackArgv = webpackYargs.parse(webpackArgvPortion);
webpackConfig = tryRequire(
function() {return require('webpack/bin/convert-argv');},
function() {return require('webpack-cli/bin/convert-argv');}
function() {return require('webpack-cli/bin/convert-argv');},
function() {return require('webpack-cli/bin/utils/convert-argv');}
)(
webpackYargs, webpackArgv
);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"babel-register": "^6.26.0",
"css-loader": "^0.28.4",
"file-loader": "^1.1.11",
"jest": "^23.1.0",
"jest": "^24.9.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.1",
"source-map-support": "^0.4.15",
"style-loader": "^0.18.2",
"webpack": "^4.12.0",
"webpack-cli": "^3.0.4",
"webpack": "^4.41.4",
"webpack-cli": "^3.3.10",
"webpack-if": "^0.1.2"
},
"peerDependencies": {
Expand Down
8 changes: 6 additions & 2 deletions src/test-entries-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ const SearchSource = tryRequire(
() => require('jest/node_modules/jest-cli/build/search_source'),
() => require('jest/node_modules/jest-cli/build/SearchSource'),
() => require('jest-cli/build/search_source'),
() => require('jest-cli/build/SearchSource')
() => require('jest-cli/build/SearchSource'),
() => require('jest/node_modules/jest-cli').SearchSource,
() => require('jest-cli').SearchSource

);
const createContext = tryRequire(
() => require('jest/node_modules/jest-cli/build/lib/create_context'),
() => require('jest/node_modules/jest-cli/build/lib/createContext'),
() => require('jest-cli/build/lib/create_context'),
() => require('jest-cli/build/lib/createContext')
() => require('jest-cli/build/lib/createContext'),
() => require('jest-runtime').createContext
);
const Runtime = tryRequire(
() => require('jest/node_modules/jest-cli/node_modules/jest-runtime'),
Expand Down
Loading