I'm using Reactjs with CRA. I have a test like this;
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?