Migrate jest to v29

This commit is contained in:
Oliver Blanthorn 2026-07-19 19:17:44 +02:00
parent 944de159bd
commit 15aee6cf3f
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
3 changed files with 799 additions and 971 deletions

View file

@ -1,7 +1,6 @@
const tsConfig = require('./tsconfig'); const tsConfig = require('./tsconfig');
module.exports = { module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom", testEnvironment: "jsdom",
testRunner: "jest-jasmine2", testRunner: "jest-jasmine2",
setupFiles: [ setupFiles: [
@ -11,16 +10,19 @@ module.exports = {
"./e2e_tests/failfast.js" "./e2e_tests/failfast.js"
], ],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
globals: { transform: {
"ts-jest": { "^.+\\.tsx?$": [
tsconfig: { "ts-jest",
...tsConfig.compilerOptions, {
tsconfig: {
...tsConfig.compilerOptions,
types: ["jest", "node", "@types/firefox-webext-browser"] types: ["jest", "node", "@types/firefox-webext-browser"]
}, },
diagnostics: { diagnostics: {
ignoreCodes: [151001] ignoreCodes: [151001]
}, }
} }
]
}, },
moduleNameMapper: { moduleNameMapper: {
"@src/(.*)": "<rootDir>/src/$1" "@src/(.*)": "<rootDir>/src/$1"

View file

@ -32,7 +32,7 @@
"devDependencies": { "devDependencies": {
"@types/css": "0.0.38", "@types/css": "0.0.38",
"@types/firefox-webext-browser": "^120.0.4", "@types/firefox-webext-browser": "^120.0.4",
"@types/jest": "^27.5.0", "@types/jest": "29.5.12",
"@types/nearley": "^2.11.5", "@types/nearley": "^2.11.5",
"@types/selenium-webdriver": "^4.1.10", "@types/selenium-webdriver": "^4.1.10",
"@typescript-eslint/eslint-plugin": "5.25.0", "@typescript-eslint/eslint-plugin": "5.25.0",
@ -47,13 +47,14 @@
"geckodriver": "^5.0.0", "geckodriver": "^5.0.0",
"git-format-staged": "^4.0.1", "git-format-staged": "^4.0.1",
"jasmine-fail-fast": "^2.0.1", "jasmine-fail-fast": "^2.0.1",
"jest": "^27.5.1", "jest": "29.7.0",
"jest-jasmine2": "^27.5.1", "jest-environment-jsdom": "29.7.0",
"jest-jasmine2": "29.7.0",
"jest-webextension-mock": "^4.0.0", "jest-webextension-mock": "^4.0.0",
"marked": "^12.0.1", "marked": "^12.0.1",
"prettier": "^3.4.2", "prettier": "^3.4.2",
"selenium-webdriver": "^4.7.1", "selenium-webdriver": "^4.7.1",
"ts-jest": "^27.1.5", "ts-jest": "29.4.11",
"typescript": "4.7.4", "typescript": "4.7.4",
"web-ext": "^7.10.0", "web-ext": "^7.10.0",
"yaml-lint": "^1.7.0" "yaml-lint": "^1.7.0"

1739
yarn.lock

File diff suppressed because it is too large Load diff