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

266
Vistas
How can I know what percentage is covered by my tests?

I want to know how much of my project is covered by my tests, and I am currently trying to use jest to do so.

This is my jest.config.js:

module.exports = {
  verbose: true,
  preset: '@vue/cli-plugin-unit-jest',
  transform: {
    '^.+\\.vue$': 'vue-jest',
  },
  jest: {
    coverageThreshold: {
      global: {
        branches: 50,
        functions: 50,
        lines: 50,
        statements: 50,
      },
      './src/components/': {
        branches: 40,
        statements: 40,
      },
      './src/reducers/**/*.js': {
        statements: 90,
      },
      './src/api/very-important-module.js': {
        branches: 100,
        functions: 100,
        lines: 100,
        statements: 100,
      },
    },
  },
}

But when I tried to run the command jest --coverage --coverageReporters="json-summary"

I get the error: bash: jest: command not found How do I solve this error?

my devDependecies are:

 "eslint-plugin-vue": "^7.0.0",
    "jest": "^27.5.0",
    "jest-cli": "^27.5.0",
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your error is

bash: jest: command not found

Which means jest isn't added to your project/installed. Install it with: npm install --save-dev jest.

More information about jest

about 4 years ago · Juan Pablo Isaza Denunciar
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