module.exports = {
  moduleFileExtensions: [
    'js',
    'jsx',
    'json',
    'vue',
  ],
  transform: {
    '^.+\\.vue$': 'vue-jest',
    '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
    '^.+\\.js(|x)?$': 'babel-jest',
  },
  transformIgnorePatterns: [
    // '/node_modules/',
    '!/src/',
    '/tests/unit/server/',
    '/common/',
  ],
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/src/$1',
  },
  snapshotSerializers: ['jest-serializer-vue'],
  testMatch: ['**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'],
  testURL: 'http://localhost/',
  watchPlugins: [
    'jest-watch-typeahead/filename',
    'jest-watch-typeahead/testname',
  ],
  'collectCoverage': true,
  "coverageReporters": [
    "text-summary",
    "text",
    "json",
    "html",
  ],
  'collectCoverageFrom': [
    '**/*.{js,vue}',
    '!**/node_modules/**',
    '!**/dist/**',
    '!**/*.config.js',
    '!**/*.eslintrc.js',
    '!**/config/**',
    '!**/migrations/**',
    '!**/models/**',
    '!**/seeders/**',
    '!**/coverage/**',
    '!app.js',
    '!src/App.vue',
    '!src/plugins/vuetify.js',
    '!src/(main|router).js',
  ],
};
