Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
Jest configuration for sub-projects

I have a Angular project that is divided in sub-projects, and I'm testing it with jest. The configuration is done in a jest.config.js file and this configuration is exported as module.exports, so when I call test for this project all the tests in the sub-projects are ran.

The problem is that I want some configuration to be of only a sub-project, there is a way to have a jest.config.js in these sub-projects?

For example:

./jest.config.js:

const { compilerOptions } = require('./tsconfig');

module.exports = {
  preset: 'jest-preset-angular',
  roots: [
    '<rootDir>/project1/src/',
    '<rootDir>/project2/src/',
  ],
  testMatch: ['**/+(*.)+(spec).+(ts)'],
  collectCoverage: true,
  coverageReporters: ['text-summary'],
};

./project1/jest.config.js:

const { compilerOptions } = require('./tsconfig');

module.exports = {
  coveragePathIgnorePatterns: ['./project1/src/models'],
};

In this case the configuration for ignoring sem path in coverage would take value only in the project1 directory.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda