Skip to content

Commit

Permalink
fix(build): react npm updates (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed May 18, 2021
1 parent 01cc3c1 commit f3087a2
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 175 deletions.
1 change: 1 addition & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"timeseries",
"uxui",
"voronoi",
"wojtekmaj",
"woot",
"wrappable",
"YYYYMMDD"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
"node-sass": "^4.14.1",
"numbro": "^2.3.2",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-i18next": "^11.8.9",
"react-redux": "^7.2.4",
"react-router": "^5.2.0",
Expand All @@ -150,10 +150,10 @@
"victory-create-container": "^35.4.11"
},
"devDependencies": {
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1",
"apidoc-mock": "^3.0.4",
"cspell": "^5.3.12",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"enzyme-to-json": "^3.6.2",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
Expand Down
78 changes: 56 additions & 22 deletions src/components/router/__tests__/__snapshots__/router.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Router Component should handle unique route settings: settings 1`] = `
<Router
<Suspense
fallback={
<Loader
skeletonProps={
Object {
"size": "sm",
}
}
tableProps={Object {}}
variant="title"
/>
}
routes={
Array [
Object {
Expand Down Expand Up @@ -42,7 +53,7 @@ exports[`Router Component should handle unique route settings: settings 1`] = `
to="/loremIpsum"
/>
</Switch>
</Router>
</Suspense>
`;

exports[`Router Component should pass customized props to routed components: routeDetail and location parsedSearch props 1`] = `
Expand Down Expand Up @@ -79,15 +90,28 @@ Object {
`;

exports[`Router Component should render a basic component: basic 1`] = `
<Router
<Suspense
fallback={
<Loader
skeletonProps={
Object {
"size": "sm",
}
}
tableProps={Object {}}
variant="title"
/>
}
routes={
Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -97,9 +121,11 @@ exports[`Router Component should render a basic component: basic 1`] = `
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -109,9 +135,11 @@ exports[`Router Component should render a basic component: basic 1`] = `
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -121,9 +149,11 @@ exports[`Router Component should render a basic component: basic 1`] = `
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -134,9 +164,11 @@ exports[`Router Component should render a basic component: basic 1`] = `
"activateOnError": true,
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -146,9 +178,11 @@ exports[`Router Component should render a basic component: basic 1`] = `
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand Down Expand Up @@ -200,5 +234,5 @@ exports[`Router Component should render a basic component: basic 1`] = `
to="/"
/>
</Switch>
</Router>
</Suspense>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -151,9 +153,11 @@ Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -163,9 +167,11 @@ Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -175,9 +181,11 @@ Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -188,9 +196,11 @@ Array [
"activateOnError": true,
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -200,9 +210,11 @@ Array [
Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ Object {
"activateOnError": true,
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -70,9 +72,11 @@ Object {
"navRoute": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -89,9 +93,11 @@ Object {
"route": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -115,9 +121,11 @@ Object {
"navRoute": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand All @@ -134,9 +142,11 @@ Object {
"route": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand Down Expand Up @@ -169,9 +179,11 @@ Object {
"navRoute": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"default": true,
"disabled": false,
Expand Down Expand Up @@ -213,9 +225,11 @@ Object {
"navRoute": Object {
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand Down Expand Up @@ -248,9 +262,11 @@ Object {
"activateOnError": true,
"component": Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
"_init": [Function],
"_payload": Object {
"_result": [Function],
"_status": -1,
},
},
"disabled": false,
"exact": true,
Expand Down
2 changes: 1 addition & 1 deletion src/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import * as pfReactCoreComponents from '@patternfly/react-core';
import * as pfReactChartComponents from '@patternfly/react-charts';

Expand Down
Loading

0 comments on commit f3087a2

Please sign in to comment.