Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
[Tests] use componentName in getPropTypeWarningMessage instead of har…
Browse files Browse the repository at this point in the history
…d-coded testComponent
  • Loading branch information
chentsulin authored and ljharb committed Sep 17, 2018
1 parent 11e45c4 commit aaaf259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/PropTypesDevelopmentReact15.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getPropTypeWarningMessage(propTypes, object, componentName) {
}
resetWarningCache();

PropTypes.checkPropTypes(propTypes, object, 'prop', 'testComponent');
PropTypes.checkPropTypes(propTypes, object, 'prop', componentName);
const callCount = console.error.calls.count();
if (callCount > 1) {
throw new Error('Too many warnings.');
Expand Down
2 changes: 1 addition & 1 deletion __tests__/PropTypesDevelopmentStandalone-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function getPropTypeWarningMessage(propTypes, object, componentName) {
}
resetWarningCache();

PropTypes.checkPropTypes(propTypes, object, 'prop', 'testComponent');
PropTypes.checkPropTypes(propTypes, object, 'prop', componentName);
const callCount = console.error.calls.count();
if (callCount > 1) {
throw new Error('Too many warnings.');
Expand Down

0 comments on commit aaaf259

Please sign in to comment.