Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda