-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #929 from trygveaa/dependency-error-message
Make sure dependency error reporting always works
- Loading branch information
Showing
1 changed file
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]. ' + | ||
'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 | ||
|
@@ -116,19 +114,18 @@ if (REACT013) { | |
} | ||
} catch (e) { | ||
if (REACT155) { | ||
console.error( // eslint-disable-line no-console | ||
throw new Error( | ||
'[email protected]+ and react-test-renderer are implicit dependencies when using ' + | ||
'[email protected]+ 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 [email protected]. ' + | ||
'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 | ||
|