Skip to content

Commit

Permalink
Merge pull request #1645 from nirnaor/master
Browse files Browse the repository at this point in the history
Adding a warning for React.addons.TestUtils.
  • Loading branch information
ljharb committed Jan 14, 2018
2 parents 0e983de + 92add21 commit 8237551
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rules/no-deprecated.js
Expand Up @@ -69,6 +69,7 @@ module.exports = {
deprecated['Perf.getMeasurementsSummaryMap'] = ['15.0.0', 'Perf.getWasted'];
// 15.5.0
deprecated[`${pragma}.createClass`] = ['15.5.0', 'the npm module create-react-class'];
deprecated[`${pragma}.addons.TestUtils`] = ['15.5.0', 'ReactDOM.TestUtils'];
deprecated[`${pragma}.PropTypes`] = ['15.5.0', 'the npm module prop-types'];
// 15.6.0
deprecated[`${pragma}.DOM`] = ['15.6.0', 'the npm module react-dom-factories'];
Expand Down
5 changes: 5 additions & 0 deletions tests/lib/rules/no-deprecated.js
Expand Up @@ -68,6 +68,11 @@ ruleTester.run('no-deprecated', rule, {
errors: [{
message: 'this.transferPropsTo is deprecated since React 0.12.0, use spread operator ({...}) instead'
}]
}, {
code: 'React.addons.TestUtils',
errors: [{
message: 'React.addons.TestUtils is deprecated since React 15.5.0, use ReactDOM.TestUtils instead'
}]
}, {
code: 'React.addons.classSet()',
errors: [{
Expand Down

0 comments on commit 8237551

Please sign in to comment.