Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

43
Vistas
Jest ---outputFile removes CLI coverage output

We use jest for unit testing in our repo, and include config for code coverage:

collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts', 'infrastructure/**/*.ts'],

Normally this results in CLI output for coverage when running the tests. Recently however we've added Danger JS integration on our PR build, and the plugin we're using to report on Jest tests relies on the --outputFile switch for the jest command i.e. jest --outputFile test-results.json --json.

With --outputFile specified code coverage is still run and results are put in the coverage directory, but the CLI output doesn't include coverage, only pass / fail information. Is it possible to have both the outputFile and coverage to stdout?

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos