微信公众号管理后台

jest.conf.js 725B

12345678910111213141516171819202122232425262728293031
  1. const path = require('path')
  2. module.exports = {
  3. rootDir: path.resolve(__dirname, '../../'),
  4. moduleFileExtensions: [
  5. 'js',
  6. 'json',
  7. 'vue'
  8. ],
  9. moduleNameMapper: {
  10. '^@/(.*)$': '<rootDir>/src/$1'
  11. },
  12. transform: {
  13. '^.+\\.js$': '<rootDir>/node_modules/babel-jest',
  14. '.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
  15. },
  16. testPathIgnorePatterns: [
  17. '<rootDir>/test/e2e'
  18. ],
  19. snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
  20. setupFiles: ['<rootDir>/test/unit/setup'],
  21. mapCoverage: true,
  22. coverageDirectory: '<rootDir>/test/unit/coverage',
  23. collectCoverageFrom: [
  24. 'src/**/*.{js,vue}',
  25. '!src/main.js',
  26. '!src/router/index.js',
  27. '!**/node_modules/**'
  28. ]
  29. }