jest.config.js 538 B

12345678910111213141516171819
  1. module.exports = {
  2. moduleFileExtensions: ['js', 'json'],
  3. transform: {
  4. '^.+\\.js$': 'babel-jest',
  5. // .vue SFC transform (test-only infra, see __tests__/vue-transform.js)
  6. '^.+\\.vue$': '<rootDir>/__tests__/vue-transform.js'
  7. },
  8. moduleNameMapper: {
  9. '^@/(.*)$': '<rootDir>/$1'
  10. },
  11. testEnvironment: 'node',
  12. testMatch: ['**/__tests__/**/*.test.js', '**/__tests__/**/*.spec.js'],
  13. setupFiles: ['<rootDir>/__tests__/setup.js'],
  14. collectCoverageFrom: [
  15. 'utils/**/*.js',
  16. 'store/**/*.js',
  17. 'config.js'
  18. ]
  19. }