tridactyl.tridactyl/jest.config.js
2026-07-19 19:17:44 +02:00

38 lines
726 B
JavaScript

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