mlpcardgame/jest.config.js

28 lines
714 B
JavaScript
Raw Normal View History

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