Skip to content

Commit

Permalink
build: remove next dependency for the Jest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Oct 5, 2024
1 parent 6832125 commit 2af3dd3
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 241 deletions.
22 changes: 0 additions & 22 deletions packages/component-library-react/jest.config.mjs

This file was deleted.

27 changes: 27 additions & 0 deletions packages/component-library-react/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { Config } from 'jest';

const config: Config = {
coverageDirectory: '../coverage/',
coverageProvider: 'v8',
extensionsToTreatAsEsm: ['.ts', '.tsx'],
moduleDirectories: ['node_modules', '<rootDir>/'],
moduleNameMapper: {
'^@utrecht/(.*)$': '<rootDir>/../../components-react/$1/src/',
},
rootDir: './src/',
setupFilesAfterEnv: ['<rootDir>/setupJest.ts'],
testEnvironment: 'jest-environment-jsdom',
testPathIgnorePatterns: ['/dist/'],
transform: {
'^.+\\.(ts|tsx)?$': [
'ts-jest',
{
useESM: true,
},
],
},
transformIgnorePatterns: ['node_modules'],
verbose: true,
};

export default config;
5 changes: 2 additions & 3 deletions packages/component-library-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@testing-library/dom": "8.20.1",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "13.4.0",
"@testing-library/jest-dom": "6.4.5",
"@testing-library/react": "15.0.7",
"@testing-library/user-event": "14.5.1",
"@types/jest": "29.5.11",
"@types/lodash.chunk": "4.2.9",
Expand Down Expand Up @@ -155,7 +155,6 @@
"gatsby": "5.12.12",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"next": "13.5.6",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-vega": "7.6.0",
Expand Down
1 change: 1 addition & 0 deletions packages/component-library-react/src/setupJest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom/jest-globals';
Loading

0 comments on commit 2af3dd3

Please sign in to comment.