jest/consistent-test-it
eslint-plugin-jest
Safe autofix
eslint.config.js
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/consistent-test-it": "error",
},
},
];test("foo", () => {});it("foo", () => {});Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
jest/consistent-test-it
eslint-plugin-jest
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/consistent-test-it": "error",
},
},
];jest/consistent-test-it
jest plugin · style
{
"plugins": [
"jest"
],
"rules": {
"jest/consistent-test-it": "error"
}
}style/useConsistentTestIt
style · since 2.4.11
{
"linter": {
"rules": {
"style": {
"useConsistentTestIt": "error"
}
}
}
}Enforce using test or it but not both
Enforces a maximum depth to nested describe calls
Suggest using the built-in equality matchers
Prefer having hooks in a consistent order