Fix the warnings that are printed to the console when running container tests:
\React_Micro_Frontends_FeedMe\container>yarn test
yarn run v1.17.3
$ react-app-rewired test
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press q to quit watch mode.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press Enter to trigger a test run.
PASS src/__tests__/MicroFrontend.test.js
● Console
console.group src/MicroFrontend.js:66
Render Micro Frontend
console.log src/MicroFrontend.js:67
Method: renderMyApp
console.log src/MicroFrontend.js:68
Container: MyApp-container
console.log src/MicroFrontend.js:69
History: "I r history"
console.log src/MicroFrontend.js:22
Fetch http://example.com/asset-manifest.json
console.log src/MicroFrontend.js:26
Manifest: {"main.js":"/myScript.js"}
console.log src/MicroFrontend.js:32
script.src: http://example.com/myScript.js
console.group src/MicroFrontend.js:66
Render Micro Frontend
console.log src/MicroFrontend.js:67
Method: renderMyApp
console.log src/MicroFrontend.js:68
Container: MyApp-container
console.log src/MicroFrontend.js:69
History: "I r history"
RUNS src/__tests__/App.test.js
Test Suites: 1 passed, 1 of 2 total
PASS src/__tests__/App.test.js
● Console
console.log src/App.js:14
Container Fetch restaurants from http://localhost:5001/restaurants.json
console.warn node_modules/react-dom/cjs/react-dom.development.js:88
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: BrowserRouter, Route, Router, Switch
console.warn node_modules/react-dom/cjs/react-dom.development.js:88
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: Route, Router, Switch
console.warn node_modules/react-dom/cjs/react-dom.development.js:88
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: Redirect
Test Suites: 2 passed, 2 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 6.767s
Ran all test suites.
Watch Usage: Press w to show more.
Fix the warnings that are printed to the console when running container tests: