Skip to content

Commit

Permalink
[deps] [*] update prop-types
Browse files Browse the repository at this point in the history
[Tests] use `PropTypes.checkPropTypes.resetWarningCache`
  • Loading branch information
ljharb committed Mar 5, 2019
1 parent cafa8c7 commit f9ed0af
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -94,7 +94,7 @@
"karma-webpack": "^1.8.1",
"lerna": "^2.11.0",
"mocha": "^3.5.3",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"rimraf": "^2.6.3",
"safe-publish-latest": "^1.1.2",
"webpack": "^1.15.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-13/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2"
"prop-types": "^15.7.2"
},
"peerDependencies": {
"enzyme": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-14/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-15.4/package.json
Expand Up @@ -39,7 +39,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-15/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-16.1/package.json
Expand Up @@ -37,7 +37,7 @@
"dependencies": {
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0",
"react-reconciler": "^0.7.0",
"react-test-renderer": "~16.0.0-0 || ~16.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-16.2/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0",
"react-reconciler": "^0.7.0",
"react-test-renderer": "~16.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-16.3/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0",
"react-reconciler": "^0.7.0",
"react-test-renderer": "~16.3.0-0"
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-react-16/package.json
Expand Up @@ -38,7 +38,7 @@
"enzyme-adapter-utils": "^1.10.0",
"object.assign": "^4.1.0",
"object.values": "^1.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"react-is": "^16.7.0",
"react-test-renderer": "^16.0.0-0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-adapter-utils/package.json
Expand Up @@ -38,7 +38,7 @@
"function.prototype.name": "^1.1.0",
"object.assign": "^4.1.0",
"object.fromentries": "^2.0.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"semver": "^5.6.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-test-suite/package.json
Expand Up @@ -39,7 +39,7 @@
"mocha-wrap": "^2.1.2",
"object-inspect": "^1.6.0",
"object.assign": "^4.1.0",
"prop-types": "^15.6.2",
"prop-types": "^15.7.2",
"semver": "^5.6.0",
"sinon": "^5.1.1"
},
Expand Down
11 changes: 10 additions & 1 deletion packages/enzyme-test-suite/test/_helpers/setupAdapters.js
@@ -1,5 +1,7 @@
const Enzyme = require('enzyme');
const wrap = require('mocha-wrap');
// eslint-disable-next-line prefer-destructuring
const resetWarningCache = require('prop-types').checkPropTypes.resetWarningCache;

const Adapter = require('./adapter');

Expand All @@ -17,5 +19,12 @@ wrap.register(function withConsoleThrows() {
origWarn.apply(console, arguments); // eslint-disable-line prefer-rest-params
throw new EvalError(msg);
},
}));
})).extend('with console throws', {
beforeEach() {
resetWarningCache();
},
afterEach() {
resetWarningCache();
},
});
});

0 comments on commit f9ed0af

Please sign in to comment.