mlpcardgame/jest.config.js

28 lines
709 B
JavaScript
Raw Normal View History

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