PR-923441: Making fixes.

This commit is contained in:
Alejandro Lembke Barrientos 2025-03-26 04:53:59 +00:00
parent 92138567a1
commit b5da68ac9a
Signed by: aleleba
GPG Key ID: F48D7CDEB47942BD
4 changed files with 33 additions and 1 deletions

View File

@ -22,7 +22,7 @@ import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')
import { mount } from 'cypress/react18';
import { mount } from '@cypress/react'
// Augment the Cypress namespace to include type definitions for
// your custom command.

27
package-lock.json generated
View File

@ -45,6 +45,7 @@
"@babel/preset-env": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.27.0",
"@cypress/react": "^9.0.1",
"@eslint/js": "^9.23.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@redux-devtools/extension": "^3.3.0",
@ -2012,6 +2013,25 @@
"node": ">=0.1.90"
}
},
"node_modules/@cypress/react": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@cypress/react/-/react-9.0.1.tgz",
"integrity": "sha512-qu6ziP2smdlfy3Yvrhm6PadxEtkc/cl6YhZu3h6KCtz+0s54joqxp6uGYOglpwyMBp3qjtSil1JVlFX0hUi5LQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"@types/react": "^18 || ^19",
"@types/react-dom": "^18 || ^19",
"cypress": "*",
"react": "^18 || ^19",
"react-dom": "^18 || ^19"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
},
"node_modules/@cypress/request": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.8.tgz",
@ -20238,6 +20258,13 @@
"dev": true,
"optional": true
},
"@cypress/react": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@cypress/react/-/react-9.0.1.tgz",
"integrity": "sha512-qu6ziP2smdlfy3Yvrhm6PadxEtkc/cl6YhZu3h6KCtz+0s54joqxp6uGYOglpwyMBp3qjtSil1JVlFX0hUi5LQ==",
"dev": true,
"requires": {}
},
"@cypress/request": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.8.tgz",

View File

@ -69,6 +69,7 @@
"@babel/preset-env": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@babel/preset-typescript": "^7.27.0",
"@cypress/react": "^9.0.1",
"@eslint/js": "^9.23.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@redux-devtools/extension": "^3.3.0",

View File

@ -3,6 +3,7 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
import { TextEncoder, TextDecoder } from 'util';
//import fetch Mock
import fetchMock from 'jest-fetch-mock';
@ -18,3 +19,6 @@ function() {
removeListener: () => {/**/}
};
};
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder as typeof global.TextDecoder;