tridactyl/jest.config.js
2020-05-09 12:28:30 +01:00

30 lines
561 B
JavaScript

const tsConfig = require('./tsconfig');
module.exports = {
preset: "ts-jest",
setupFiles: [
"jest-webextension-mock"
],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
globals: {
"ts-jest": {
tsConfig: {
...tsConfig.compilerOptions,
types: ["jest", "node", "web-ext-types"]
},
diagnostics: {
ignoreCodes: [151001]
},
}
},
moduleNameMapper: {
"@src/(.*)": "<rootDir>/src/$1"
},
moduleFileExtensions: [
"ts",
"tsx",
"js",
"jsx",
"json"
],
};