Skip to content

Commit

Permalink
feat(cozy-sharing): Replace jsdom-sixteen package
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Dec 23, 2024
1 parent 1f7605c commit a34322f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
11 changes: 3 additions & 8 deletions packages/cozy-sharing/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
module.exports = {
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!**/node_modules/**',
'!**/vendor/**',
'!**/*.stories.{js,jsx,ts,tsx}'
],
testPathIgnorePatterns: ['node_modules', 'dist', '__tests__'],
testEnvironment: 'jest-environment-jsdom',
roots: ['<rootDir>/src'],
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
moduleFileExtensions: ['js', 'jsx', 'json', 'styl', 'ts', 'tsx'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'.(png|gif|jpe?g)$': '<rootDir>/jestHelpers/mocks/fileMock.js',
Expand All @@ -18,6 +13,6 @@ module.exports = {
'^cozy-logger$': 'cozy-logger/dist/index.js',
'^cozy-client$': 'cozy-client/dist/index.js'
},
transformIgnorePatterns: ['node_modules/(?!cozy-ui)'],
transformIgnorePatterns: ['node_modules/(?!(cozy-ui|cozy-harvest-lib))'],
setupFilesAfterEnv: ['<rootDir>/jestHelpers/setup.js']
}
3 changes: 2 additions & 1 deletion packages/cozy-sharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build:doc:react": "(cd ../.. && TARGET=cozy-sharing yarn build:doc:react)",
"deploy:doc": "(cd ../.. && yarn deploy:doc)",
"prepublishOnly": "yarn build",
"test": "env NODE_ENV=test jest --env=jest-environment-jsdom-sixteen",
"test": "env NODE_ENV=test jest",
"lint": "cd .. && yarn eslint --ext js,jsx packages/cozy-sharing",
"start": "yarn build --watch",
"watch": "yarn run start",
Expand Down Expand Up @@ -55,6 +55,7 @@
"cozy-client": "^51.6.1",
"cozy-ui": "^115.0.2",
"jest": "26.6.3",
"jest-environment-jsdom": "26.6.2",
"react": "16.12.0",
"react-dom": "16.13.0",
"react-router": "^5.0.1",
Expand Down

0 comments on commit a34322f

Please sign in to comment.