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

103
Vistas
jest-dom eslint rule violation not breaking test

I'm using Reactjs with CRA. I have a test like this;

enter image description here

I'm deliberately forcing jest-dom to produce this prefer-to-have-text-content warning. My test still runs OK and the result is success. Now, I want my test to fail. My .eslintrc file is like;

{
  "plugins": ["testing-library", "jest-dom"],

  "extends": [
    "react-app",
    "react-app/jest",
    "plugin:testing-library/react",
    "plugin:jest-dom/recommended"
  ],
  "rules": {
    "jest-dom/prefer-to-have-text-content": "error"
  }
}

However, my test still succeds! How can I make my test fail in case of such jest-dom issues?

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