module.exports = {
  roots: ['<rootDir>/app/src/', '<rootDir>/app/test/'],
  transform: {
    '^.+\\.tsx?$': 'ts-jest',
  },
  testMatch: ['**/unit/**/*-test.ts'],
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  setupFiles: [
    '<rootDir>/app/test/globals.ts',
    '<rootDir>/app/test/unit-test-env.ts',
  ],
  setupTestFrameworkScriptFile: '<rootDir>/app/test/setup-test-framework.ts',
  collectCoverageFrom: [
    '**/*.{js,jsx,ts,tsx}',
    '!**/node_modules/**',
    '!**/vendor/**',
    '!**/*.d.*',
  ],
  globals: {
    'ts-jest': {
      useBabelrc: true,
    },
  },
}

module.exports = {
  roots: ['<rootDir>/app/src/', '<rootDir>/app/test/'],
  transform: {
    '^.+\\.tsx?$': 'ts-jest',
  },
  testMatch: ['**/unit/**/*-test.ts'],
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  setupFiles: [
    '<rootDir>/app/test/globals.ts',
    '<rootDir>/app/test/unit-test-env.ts',
  ],
  setupTestFrameworkScriptFile: '<rootDir>/app/test/setup-test-framework.ts',
  collectCoverageFrom: [
    '**/*.{js,jsx,ts,tsx}',
    '!**/node_modules/**',
    '!**/vendor/**',
    '!**/*.d.*',
    // skip coverage of test scripts
    '!app/test/**/*',
    // ignore scripts
    '!script/**/*',
    // not focused on testing these areas currently
    '!app/src/ask-pass/**/*',
    '!app/src/cli/**/*',
    '!app/src/crash/**/*',
    '!app/src/highlighter/**/*',
    // ignore index files
    '!**/index.ts',
  ],
  globals: {
    'ts-jest': {
      useBabelrc: true,
    },
  },
}

add some folders to be ignored by code coverage