Skip to content

Commit 50fc9a7

Browse files
committed
Everything up to date all jest tests pass but the react App still won't start there are a few errors
1 parent 3e248ab commit 50fc9a7

22 files changed

+140
-153
lines changed

package.json

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "build web extension bundle.js",
44
"scripts": {
55
"build": "NODE_OPTIONS=--openssl-legacy-provider webpack --mode production",
6-
"dev": "set NODE_OPTIONS=--openssl-legacy-provider&& webpack --mode development --watch",
6+
"dev": " webpack --mode development --watch",
77
"buildlegacy": "webpack --mode production",
88
"devlegacy": "webpack --mode development --watch",
99
"test": "jest --verbose --coverage",
@@ -125,7 +125,7 @@
125125
"@babel/preset-react": "^7.12.7",
126126
"@babel/preset-typescript": "^7.21.5",
127127
"@inrupt/jest-jsdom-polyfills": "^1.6.2",
128-
"@testing-library/jest-dom": "^4.2.4",
128+
"@testing-library/jest-dom": "^5.16.0",
129129
"@testing-library/react": "^13.4.0",
130130
"@testing-library/user-event": "^14.4.3",
131131
"@types/chai": "^4.2.14",
@@ -135,26 +135,24 @@
135135
"@types/jest": "^29.5.0",
136136
"@types/lodash.isequal": "^4.5.5",
137137
"@types/node": "^14.0.0",
138-
"@types/react": "^17.0.43",
138+
"@types/react": "^18.2.0",
139139
"@types/react-router": "^5.1.20",
140-
"@typescript-eslint/eslint-plugin": "^3.6.1",
141-
"@typescript-eslint/parser": "^3.6.1",
140+
"@typescript-eslint/eslint-plugin": "^6.0.0",
141+
"@typescript-eslint/parser": "^6.0.0",
142142
"babel-loader": "^8.1.0",
143143
"babel-preset-airbnb": "^5.0.0",
144144
"core-js": "^3.6.5",
145145
"css-loader": "^3.6.0",
146-
"enzyme": "^3.11.0",
147-
"enzyme-adapter-react-16": "^1.15.6",
148-
"eslint": "^8.36.0",
149-
"eslint-config-airbnb": "^18.2.0",
150-
"eslint-plugin-import": "^2.22.0",
151-
"eslint-plugin-jest": "^22.21.0",
152-
"eslint-plugin-jest-dom": "^4.0.3",
153-
"eslint-plugin-jsx-a11y": "^6.3.1",
154-
"eslint-plugin-react": "^7.20.3",
155-
"eslint-plugin-react-hooks": "^1.7.0",
156-
"eslint-plugin-testing-library": "^5.10.3",
157-
"express": "^4.17.1",
146+
"eslint": "^8.55.0",
147+
"eslint-config-airbnb": "^19.0.4",
148+
"eslint-plugin-import": "^2.29.1",
149+
"eslint-plugin-jest": "^27.0.0",
150+
"eslint-plugin-jest-dom": "^5.0.0",
151+
"eslint-plugin-jsx-a11y": "^6.8.0",
152+
"eslint-plugin-react": "^7.33.2",
153+
"eslint-plugin-react-hooks": "^4.4.0",
154+
"eslint-plugin-testing-library": "^6.2.0",
155+
"express": "^4.18.2",
158156
"jest": "^29.5.0",
159157
"jest-cli": "^26.1.0",
160158
"jest-diff": "^26.1.0",
@@ -164,8 +162,8 @@
164162
"prettier": "2.8.4",
165163
"puppeteer": "^14.3.0",
166164
"react-devtools-core": "^4.27.3",
167-
"sass": "^1.26.10",
168-
"sass-loader": "^7.3.1",
165+
"sass": "^1.69.5",
166+
"sass-loader": "^10.5.0",
169167
"sinon-chrome": "^3.0.1",
170168
"style-loader": "^0.23.1",
171169
"ts-jest": "^29.0.5",
@@ -174,38 +172,37 @@
174172
"typedoc": "^0.5.0",
175173
"typedoc-webpack-plugin": "^1.1.4",
176174
"typescript": "^4.9.0",
177-
"webpack": "^4.43.0",
178-
"webpack-chrome-extension-reloader": "^1.3.0",
179-
"webpack-cli": "^3.3.12"
175+
"webpack": "^5.89.0",
176+
"webpack-cli": "^5.1.4"
180177
},
181178
"dependencies": {
182179
"@emotion/react": "^11.11.1",
183180
"@emotion/styled": "^11.11.0",
184181
"@mui/icons-material": "^5.14.1",
185182
"@mui/material": "^5.14.12",
186183
"@mui/system": "^5.14.12",
187-
"@reduxjs/toolkit": "^1.9.6",
188-
"@types/react-dom": "^17.0.14",
184+
"@reduxjs/toolkit": "^2.0.1",
185+
"@types/react-dom": "^18.2.0",
189186
"@types/react-router-dom": "^5.3.3",
190-
"@visx/axis": "^1.0.0",
191-
"@visx/brush": "^1.2.0",
192-
"@visx/clip-path": "^1.0.0",
193-
"@visx/event": "^1.0.0",
194-
"@visx/glyph": "^1.0.0",
195-
"@visx/gradient": "^1.0.0",
196-
"@visx/grid": "^1.0.0",
197-
"@visx/group": "^3.0.0",
198-
"@visx/hierarchy": "^1.0.0",
199-
"@visx/legend": "^1.0.0",
200-
"@visx/responsive": "^1.0.0",
201-
"@visx/scale": "^1.0.0",
202-
"@visx/shape": "^3.0.0",
203-
"@visx/text": "^3.0.0",
204-
"@visx/tooltip": "^1.0.0",
205-
"@visx/zoom": "^1.0.0",
187+
"@visx/axis": "^3.5.0",
188+
"@visx/brush": "^3.6.0",
189+
"@visx/clip-path": "^3.3.0",
190+
"@visx/event": "^3.3.0",
191+
"@visx/glyph": "^3.3.0",
192+
"@visx/gradient": "^3.3.0",
193+
"@visx/grid": "^3.5.0",
194+
"@visx/group": "^3.3.0",
195+
"@visx/hierarchy": "^3.3.0",
196+
"@visx/legend": "^3.5.0",
197+
"@visx/responsive": "^3.3.0",
198+
"@visx/scale": "^3.5.0",
199+
"@visx/shape": "^3.5.0",
200+
"@visx/text": "^3.3.0",
201+
"@visx/tooltip": "^3.3.0",
202+
"@visx/zoom": "^3.3.0",
206203
"acorn": "^7.3.1",
207204
"acorn-jsx": "^5.2.0",
208-
"apexcharts": "^3.23.1",
205+
"apexcharts": "^3.44.2",
209206
"d3": "^7.6.1",
210207
"d3-scale-chromatic": "^3.0.0",
211208
"d3-shape": "^2.0.0",
@@ -219,17 +216,17 @@
219216
"prop-types": "^15.7.2",
220217
"rc-slider": "^8.7.1",
221218
"rc-tooltip": "^3.7.3",
222-
"react": "^18.0.0",
223-
"react-apexcharts": "^1.3.7",
219+
"react": "^18.2.0",
220+
"react-apexcharts": "^1.4.1",
224221
"react-dom": "^18.2.0",
225-
"react-hover": "^2.0.0",
226-
"react-html-parser": "^2.0.2",
227-
"react-json-tree": "^0.11.2",
228-
"react-redux": "^8.1.3",
229-
"react-router-dom": "^5.2.0",
230-
"react-select": "^3.2.0",
231-
"react-spinners": "^0.11.0",
232-
"redux": "^4.2.1",
222+
"react-hover": "^3.0.1",
223+
"html-react-parser": "^5.0.7",
224+
"react-json-tree": "^0.18.0",
225+
"react-redux": "^9.0.4",
226+
"react-router-dom": "^6.21.0",
227+
"react-select": "^5.8.0",
228+
"react-spinners": "^0.13.8",
229+
"redux": "^5.0.0",
233230
"redux-mock-store": "^1.5.4",
234231
"styled-components": "^6.0.4",
235232
"util": "^0.12.4",

src/app/__tests__/ActionContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render as rtlRender, screen, fireEvent } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect';
3+
import '@testing-library/jest-dom';
44
import ActionContainer from '../containers/ActionContainer';
55
import TravelContainer from '../containers/TravelContainer';
66
import { Provider } from 'react-redux';

src/app/__tests__/ButtonContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render as rtlRender, screen, fireEvent } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect';
3+
import '@testing-library/jest-dom';
44
import { TextEncoder } from 'util';
55
global.TextEncoder = TextEncoder;
66
import ButtonsContainer from '../containers/ButtonsContainer';

src/app/__tests__/ErrorContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render as rtlRender, screen } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
3+
import '@testing-library/jest-dom'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
44
import ErrorContainer from '../containers/ErrorContainer';
55
import { configureStore } from '@reduxjs/toolkit';
66
import { mainSlice } from '../slices/mainSlice';

src/app/__tests__/ErrorMsg.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render, screen } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
3+
import '@testing-library/jest-dom'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
44
import ErrorMsg from '../components/ErrorMsg';
55

66
const props = {

src/app/__tests__/Loader.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import React from 'react';
22
import { render } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
3+
import '@testing-library/jest-dom'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
44
import Loader from '../components/Loader';
55

66
describe('unit testing for Loader.tsx', () => {
77
test('renders a loading icon', () => {
88
const { container } = render(<Loader loading={true} result={false} />);
9-
expect(container.firstChild).toHaveClass('css-1tm071a');
9+
console.log('this is our container.firstChild: ', container.firstChild);
10+
expect(container.firstChild).toHaveClass('docs-story css-kdwx3d');
1011
});
1112

1213
test('renders a fail icon', () => {
1314
const { container } = render(<Loader loading={false} result={false} />);
15+
console.log('this is a fail2: ', container.getElementsByClassName('fail')[0]);
1416
expect(container.getElementsByClassName('fail').length).toBe(1);
1517
});
1618

src/app/__tests__/MainSlider.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { render as rtlRender, screen } from '@testing-library/react';
3-
import '@testing-library/jest-dom/extend-expect';
3+
import '@testing-library/jest-dom';
44
import MainSlider from '../components/MainSlider';
55
import { mainSlice } from '../slices/mainSlice';
66
import { Provider } from 'react-redux';

src/app/__tests__/TravelContainer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { mainSlice } from '../slices/mainSlice';
77
import { useDispatch } from 'react-redux';
88
import { ThemeProvider } from '@mui/material/styles';
99
import theme from '../components/theme';
10-
import '@testing-library/jest-dom/extend-expect'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
10+
import '@testing-library/jest-dom'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
1111

1212
const customTabs = {
1313
87: {

src/app/__tests__/TravelForwardBackward.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Provider } from 'react-redux';
55
import { configureStore } from '@reduxjs/toolkit';
66
import { mainSlice } from '../slices/mainSlice';
77
import { useDispatch } from 'react-redux';
8-
import '@testing-library/jest-dom/extend-expect'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
8+
import '@testing-library/jest-dom'; // needed this to extend the jest-dom assertions (ex toHaveTextContent)
99

1010
const customTabs = {
1111
87: {

src/app/__tests__/Tutorial.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { render, screen, fireEvent } from '@testing-library/react';
33
import '@testing-library/jest-dom';
44
import { TextEncoder } from 'util';
55
global.TextEncoder = TextEncoder;
6-
import '@testing-library/jest-dom/extend-expect';
6+
import '@testing-library/jest-dom';
77
import Tutorial from '../components/Tutorial';
88

99
const dispatch = jest.fn();

0 commit comments

Comments
 (0)