diff --git a/config/jest.config.js b/config/jest.config.js index ef0f9df..46fc98e 100644 --- a/config/jest.config.js +++ b/config/jest.config.js @@ -1,4 +1,5 @@ module.exports = { + testEnvironment: 'jsdom', setupFilesAfterEnv: ['./jest.setup.js'], transform: { '\\.js$': ['babel-jest', { configFile: './config/babel.config.js' }], diff --git a/package.json b/package.json index 517905d..5924b3f 100644 --- a/package.json +++ b/package.json @@ -23,23 +23,24 @@ "license": "MIT", "dependencies": { "colord": "^2.9.3", - "prop-types": "^15.7.2" + "prop-types": "^15.8.1" }, "devDependencies": { - "@babel/core": "^7.12.3", - "@babel/plugin-transform-runtime": "^7.26.8", - "@babel/preset-env": "^7.12.1", - "@babel/preset-react": "^7.12.1", - "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.2.0", - "babel-jest": "^26.6.0", + "@babel/core": "^7.28.3", + "@babel/plugin-transform-runtime": "^7.28.3", + "@babel/preset-env": "^7.28.3", + "@babel/preset-react": "^7.27.1", + "@testing-library/dom": "^10.4.1", + "@testing-library/jest-dom": "^6.8.0", + "@testing-library/react": "^16.3.0", + "babel-jest": "^30.0.5", "component-image": "^2.1.1", - "jest": "^26.6.0", - "jest-image-snapshot": "^4.2.0", - "microbundle": "^0.12.4", - "react": "^19.0.0", - "react-dom": "^19.0.0" + "jest": "^30.0.5", + "jest-environment-jsdom": "^30.0.5", + "jest-image-snapshot": "^6.5.1", + "microbundle": "^0.15.1", + "react": "^19.1.1", + "react-dom": "^19.1.1" }, "peerDependencies": { "react": "^19.0.0 || ^18.0.0 || ^17.0.0 || ^16.2.0", diff --git a/src/__tests__/FileIcon.test.js b/src/__tests__/FileIcon.test.js index d856eee..fd68219 100644 --- a/src/__tests__/FileIcon.test.js +++ b/src/__tests__/FileIcon.test.js @@ -9,6 +9,10 @@ expect.extend({ toMatchImageSnapshot }); import { FileIcon, defaultStyles } from '../../dist/react-file-icon'; +const PUPPETEER_OPTIONS = { + args: ['--no-sandbox', '--disable-dev-shm-usage'], +}; + const renderWithStyle = content => { return render(