jest.config.js 538 B

123456789101112131415161718
  1. module.exports = {
  2. moduleFileExtensions: ["js", "jsx", "json", "vue"],
  3. transform: {
  4. "^.+\\.vue$": "vue-jest",
  5. ".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
  6. "jest-transform-stub",
  7. "^.+\\.jsx?$": "babel-jest"
  8. },
  9. transformIgnorePatterns: ["/node_modules/"],
  10. moduleNameMapper: {
  11. "^@/(.*)$": "<rootDir>/src/$1"
  12. },
  13. snapshotSerializers: ["jest-serializer-vue"],
  14. testMatch: [
  15. "**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
  16. ],
  17. testURL: "http://localhost/"
  18. };