Skip to content

Commit

Permalink
tests:adding common tools and remove tests dts (#583)
Browse files Browse the repository at this point in the history
named testUtils.test.tsx to avoid being packaged in the distributed package

Signed-off-by: capyq <quentin.capy@rte-france.com>
  • Loading branch information
capyq authored Nov 7, 2024
1 parent f1a1d41 commit c58ced5
Show file tree
Hide file tree
Showing 7 changed files with 319 additions and 5 deletions.
3 changes: 2 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const config: Config = {
globals: {
IS_REACT_ACT_ENVIRONMENT: true,
},
setupFiles: ['<rootDir>/jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['<rootDir>/src/tests/testsUtils.test.tsx'],
};

export default config;
1 change: 1 addition & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import '@testing-library/jest-dom'
import { TextEncoder, TextDecoder } from 'util';

// fix for ReferenceError: TextDecoder / TextEncoder is not defined
Expand Down
182 changes: 182 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@
"uuid": "^9.0.1"
},
"peerDependencies": {
"@mui/system": "^5.15.15",
"@mui/x-tree-view": "^6.17.0",
"papaparse": "^5.4.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@hookform/resolvers": "^3.3.4",
"@mui/icons-material": "^5.15.14",
"@mui/lab": "5.0.0-alpha.169",
"@mui/material": "^5.15.14",
"@mui/system": "^5.15.15",
"@mui/x-tree-view": "^6.17.0",
"ag-grid-community": "^31.0.0",
"ag-grid-react": "^31.2.0",
"notistack": "^3.0.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.2",
Expand All @@ -80,10 +80,13 @@
"@mui/lab": "5.0.0-alpha.169",
"@mui/material": "^5.15.14",
"@react-hook/window-size": "^3.1.1",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/autosuggest-highlight": "^3.2.3",
"@types/eslint": "^8.56.7",
"@types/eslint-config-prettier": "^6.11.3",
"@types/jest": "^29.5.13",
"@types/json-logic-js": "^2.0.7",
"@types/license-checker": "^25.0.6",
"@types/localized-countries": "^2.0.3",
Expand Down Expand Up @@ -119,6 +122,7 @@
"glob": "^10.3.12",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-dom": "^4.0.0",
"jest-environment-jsdom": "^29.7.0",
"license-checker": "^25.0.1",
"notistack": "^3.0.1",
Expand Down
Loading

0 comments on commit c58ced5

Please sign in to comment.