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

Make sure dependency error reporting always works #929

Merged
merged 1 commit into from
May 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/react-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,11 @@ if (REACT013) {
// eslint-disable-next-line import/no-extraneous-dependencies
ReactDOM = require('react-dom');
} catch (e) {
// eslint-disable-next-line no-console
console.error(
throw new Error(
'react-dom is an implicit dependency in order to support react@0.13-14. ' +
'Please add the appropriate version to your devDependencies. ' +
'See https://github.com/airbnb/enzyme#installation',
);
throw e;
}

// eslint-disable-next-line import/no-extraneous-dependencies
Expand Down Expand Up @@ -116,19 +114,18 @@ if (REACT013) {
}
} catch (e) {
if (REACT155) {
console.error( // eslint-disable-line no-console
throw new Error(
'react-dom@15.5+ and react-test-renderer are implicit dependencies when using ' +
'react@15.5+ with enzyme. Please add the appropriate version to your ' +
'devDependencies. See https://github.com/airbnb/enzyme#installation',
);
} else {
console.error( // eslint-disable-line no-console
throw new Error(
'react-addons-test-utils is an implicit dependency in order to support react@0.13-14. ' +
'Please add the appropriate version to your devDependencies. ' +
'See https://github.com/airbnb/enzyme#installation',
);
}
throw e;
}

// Shallow rendering changed from 0.13 => 0.14 in such a way that
Expand Down