module.exports = {
  resetMocks: true,
  preset: '@nuxt/test-utils',
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/$1',
    '^~/(.*)$': '<rootDir>/$1',
    '^vue$': 'vue/dist/vue.common.js'
  },
  moduleFileExtensions: [
    'ts',
    'js',
    'vue',
    'json'
  ],
  testEnvironment: 'jsdom',
  transform: {
    '^.+\\.ts$': 'ts-jest',
    '^.+\\.js$': 'babel-jest',
    '.*\\.(vue)$': 'vue-jest'
  },
  collectCoverage: true,
  collectCoverageFrom: [
    '<rootDir>/components/**/*.vue',
    '<rootDir>/middleware/**/*.ts',
    '<rootDir>/services/**/*.ts',
    '<rootDir>/composables/**/*.ts',
    '<rootDir>/pages/**/*.vue'
  ],
  setupFiles: ['<rootDir>/tests/unit/index.ts']
}
