2019-09-05 07:34:18 +00:00
|
|
|
module.exports = {
|
2019-09-06 12:36:11 +00:00
|
|
|
moduleFileExtensions: ["js", "jsx", "json", "vue", "ts", "tsx"],
|
2019-09-05 07:34:18 +00:00
|
|
|
transform: {
|
2019-09-06 12:36:11 +00:00
|
|
|
"^.+\\.vue$": "vue-jest",
|
2019-09-20 10:49:15 +00:00
|
|
|
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2|webp)$":
|
2019-09-06 12:36:11 +00:00
|
|
|
"jest-transform-stub",
|
|
|
|
"^.+\\.tsx?$": "ts-jest"
|
2019-09-05 07:34:18 +00:00
|
|
|
},
|
2019-09-06 12:36:11 +00:00
|
|
|
transformIgnorePatterns: ["/node_modules/"],
|
2019-09-05 07:34:18 +00:00
|
|
|
moduleNameMapper: {
|
2019-09-06 12:36:11 +00:00
|
|
|
"^@/(.*)$": "<rootDir>/src/$1"
|
2019-09-05 07:34:18 +00:00
|
|
|
},
|
2019-09-06 12:36:11 +00:00
|
|
|
snapshotSerializers: ["jest-serializer-vue"],
|
2019-09-05 07:34:18 +00:00
|
|
|
testMatch: [
|
2019-09-06 12:36:11 +00:00
|
|
|
"**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
|
2019-09-05 07:34:18 +00:00
|
|
|
],
|
2019-09-06 12:36:11 +00:00
|
|
|
testURL: "http://localhost/",
|
2019-09-05 07:34:18 +00:00
|
|
|
watchPlugins: [
|
2019-09-06 12:36:11 +00:00
|
|
|
"jest-watch-typeahead/filename",
|
|
|
|
"jest-watch-typeahead/testname"
|
2019-09-05 07:34:18 +00:00
|
|
|
],
|
|
|
|
globals: {
|
2019-09-06 12:36:11 +00:00
|
|
|
"ts-jest": {
|
2019-09-05 07:34:18 +00:00
|
|
|
babelConfig: true
|
|
|
|
}
|
|
|
|
}
|
2019-09-06 12:36:11 +00:00
|
|
|
};
|