All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.client.angular.core.jest.conf.js.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
const { pathsToModuleNameMapper } = require('ts-jest');

const {
  compilerOptions: { paths = {}, baseUrl = './' },
} = require('./tsconfig.json');

module.exports = {
  transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|dayjs/esm)'],
  resolver: 'jest-preset-angular/build/resolvers/ng-jest-resolver.js',
  roots: ['', `/${baseUrl}`],
  modulePaths: [`/${baseUrl}`],
  cacheDirectory: '/{{projectBuildDirectory}}/jest-cache',
  coverageDirectory: '/{{projectBuildDirectory}}/test-results/',
  coverageThreshold: {
    global: {
      statements: 100,
      branches: 100,
      functions: 100,
      lines: 100,
    },
  },
  moduleNameMapper: pathsToModuleNameMapper(paths, { prefix: `/${baseUrl}/` }),
  testEnvironmentOptions: {
    url: 'https://jestjs.io',
  },
  testMatch: ['/src/main/webapp/environments/**/@(*.)@(spec.ts)', '/src/main/webapp/app/**/@(*.)@(spec.ts)'],
  testResultsProcessor: 'jest-sonar-reporter',
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy