tridactyl/jest.config.js

31 lines
561 B
JavaScript
Raw Normal View History

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