From: Jeremy Davis Date: Wed, 21 Dec 2022 11:29:07 +0000 (+0100) Subject: [NO JIRA] Upgrade jest-emotion --> @emotion/jest X-Git-Tag: 9.9.0.65466~144 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b63e16cfc662c0c5cdd05b9db64ac17b5644c260;p=sonarqube.git [NO JIRA] Upgrade jest-emotion --> @emotion/jest --- diff --git a/server/sonar-web/jest.config.js b/server/sonar-web/jest.config.js index dfe11fab60d..38e2b543ac4 100644 --- a/server/sonar-web/jest.config.js +++ b/server/sonar-web/jest.config.js @@ -4,22 +4,22 @@ module.exports = { coverageReporters: ['lcovonly', 'text'], globals: { 'ts-jest': { - diagnostics: false - } + diagnostics: false, + }, }, moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], moduleNameMapper: { '^.+\\.(md|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/config/jest/FileStub.js', - '^.+\\.css$': '/config/jest/CSSStub.js' + '^.+\\.css$': '/config/jest/CSSStub.js', }, setupFiles: [ '/config/polyfills.ts', '/config/jest/SetupEnzyme.ts', - '/config/jest/SetupTestEnvironment.ts' + '/config/jest/SetupTestEnvironment.ts', ], setupFilesAfterEnv: ['/config/jest/SetupReactTestingLibrary.ts'], - snapshotSerializers: ['enzyme-to-json/serializer', 'jest-emotion'], + snapshotSerializers: ['enzyme-to-json/serializer', '@emotion/jest/serializer'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/config', '/node_modules', '/scripts'], testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$', @@ -28,10 +28,10 @@ module.exports = { '@swc/jest', { jsc: { - target: 'es2018' - } - } - ] + target: 'es2018', + }, + }, + ], }, transformIgnorePatterns: ['/node_modules/(?!(d3-.+))/'], reporters: [ @@ -44,15 +44,15 @@ module.exports = { ancestorSeparator: ' > ', suiteNameTemplate: '{filename}', classNameTemplate: '{classname}', - titleTemplate: '{title}' - } + titleTemplate: '{title}', + }, ], [ './config/jest/ElasticSearchReporter.js', { - outputFilepath: '/tmp/ut-ts-web-monitoring.log' - } - ] + outputFilepath: '/tmp/ut-ts-web-monitoring.log', + }, + ], ], - testTimeout: 30000 + testTimeout: 30000, }; diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 52c98cae9ef..abfbddd7bda 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -86,7 +86,6 @@ "fs-extra": "11.1.0", "http-proxy": "1.18.1", "jest": "29.3.1", - "jest-emotion": "10.0.32", "jest-environment-jsdom": "29.3.1", "jest-junit": "13.0.0", "jsdom": "20.0.3", diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap index 85382613b9f..e6cdc125060 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap @@ -10,7 +10,6 @@ exports[`should render 1`] = ` loading={false} > + @@ -53,9 +51,7 @@ exports[`should render correctly: branch with number of days 1`] = ` `; exports[`should render correctly: branch with previous version 1`] = ` - + @@ -104,9 +100,7 @@ exports[`should render correctly: branch with previous version 1`] = ` `; exports[`should render correctly: branch with reference branch 1`] = ` - + @@ -156,9 +150,7 @@ exports[`should render correctly: branch with reference branch 1`] = ` `; exports[`should render correctly: branch with specific analysis 1`] = ` - + @@ -260,9 +252,7 @@ exports[`should render correctly: faulty branch 1`] = ` `; exports[`should render correctly: main branch with default 1`] = ` - + diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap index 44825139d16..864ca534348 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap @@ -80,9 +80,7 @@ exports[`should handle the descending sort direction 1`] = ` innerRef={[Function]} onClick={[Function]} > - + @@ -175,9 +173,7 @@ exports[`should render correctly for leak view 1`] = ` innerRef={[Function]} onClick={[Function]} > - + @@ -270,9 +266,7 @@ exports[`should render correctly for overall view 1`] = ` innerRef={[Function]} onClick={[Function]} > - + diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap index 20d8cf07dd1..8d9c7eb4cb3 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap @@ -34,7 +34,6 @@ exports[`New code measures should be rendered properly 1`] = ` className="bordered-left little-spacer" />