diff --git a/__tests__/staticProps.test.jsx b/__tests__/staticProps.test.jsx
index 69f21a5..52fe473 100644
--- a/__tests__/staticProps.test.jsx
+++ b/__tests__/staticProps.test.jsx
@@ -50,13 +50,18 @@ describe('static props', () => {
name: PropTypes.string.isRequired,
};
- const ViewComp = view(MyCustomCompName);
+ const ViewComp = MyCustomCompName;
const errorSpy = jest
.spyOn(console, 'error')
- .mockImplementation((message) =>
- expect(message.indexOf('Failed prop type')).not.toBe(-1),
- );
+ .mockImplementation((warning, prop, error) => {
+ expect(warning).toBe('Warning: Failed %s type: %s%s');
+ expect(prop).toBe('prop');
+ expect(error).toBe(
+ 'The prop `name` is marked as required in `MyCustomCompName`, but its value is `undefined`.',
+ );
+ });
+ expect(1).toBe(1);
render();
expect(errorSpy).toHaveBeenCalled();
errorSpy.mockRestore();
@@ -75,9 +80,13 @@ describe('static props', () => {
const errorSpy = jest
.spyOn(console, 'error')
- .mockImplementation((message) =>
- expect(message.indexOf('Failed prop type')).not.toBe(-1),
- );
+ .mockImplementation((warning, prop, error) => {
+ expect(warning).toBe('Warning: Failed %s type: %s%s');
+ expect(prop).toBe('prop');
+ expect(error).toBe(
+ 'Invalid prop `number` of type `string` supplied to `MyCustomCompName`, expected `number`.',
+ );
+ });
render();
expect(errorSpy).toHaveBeenCalled();
errorSpy.mockRestore();
diff --git a/package-lock.json b/package-lock.json
index c34de00..24e1757 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17271,14 +17271,13 @@
}
},
"react": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
- "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
+ "version": "17.0.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz",
+ "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "prop-types": "^15.6.2"
+ "object-assign": "^4.1.1"
}
},
"react-devtools-core": {
@@ -17292,21 +17291,20 @@
}
},
"react-dom": {
- "version": "16.14.0",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz",
- "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==",
+ "version": "17.0.1",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz",
+ "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "scheduler": "^0.19.1"
+ "scheduler": "^0.20.1"
},
"dependencies": {
"scheduler": {
- "version": "0.19.1",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz",
- "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==",
+ "version": "0.20.1",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz",
+ "integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
diff --git a/package.json b/package.json
index 3ff1b9e..0e665c7 100644
--- a/package.json
+++ b/package.json
@@ -103,8 +103,8 @@
"no-hook-react-testing-library": "npm:react-testing-library@5.4.4",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
- "react": "^16.12.0",
- "react-dom": "^16.13.0",
+ "react": "^17.0.1",
+ "react-dom": "^17.0.1",
"react-native": "^0.63.4",
"react-router-dom": "^5.2.0",
"react-test-renderer": "^17.0.1",