# consistent-test-it

Rule `jest/consistent-test-it`. Enforce `test` and `it` usage conventions

- Source: jest
- Technologies: Testing
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1659 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jest/consistent-test-it` | no | safe | package `eslint-plugin-jest` | [docs](https://github.com/jest-community/eslint-plugin-jest/blob/v29.17.2/docs/rules/consistent-test-it.md) |
| Oxlint | `jest/consistent-test-it` | no | safe | plugin `jest`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/jest/consistent-test-it.html) |
| Biome | `style/useConsistentTestIt` | no | safe | group style, since 2.4.11 | [docs](https://biomejs.dev/linter/rules/use-consistent-test-it/) |

## Code examples

### Incorrect: the rule reports this

```js
test("foo", () => {});
```

### Correct: the rule accepts this

```js
it("foo", () => {});
```

Examples from the Biome documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import jest from "eslint-plugin-jest";

export default [
  {
    plugins: { jest },
    rules: {
      "jest/consistent-test-it": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "jest"
  ],
  "rules": {
    "jest/consistent-test-it": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useConsistentTestIt": "error"
      }
    }
  }
}
```

## Related rules

- [vitest/consistent-test-it](https://lintradar.dev/rules/vitest/consistent-test-it.md): Enforce using test or it but not both
- [jest/max-nested-describe](https://lintradar.dev/rules/jest/max-nested-describe.md): Enforces a maximum depth to nested describe calls
- [jest/no-hooks](https://lintradar.dev/rules/jest/no-hooks.md): Disallow setup and teardown hooks
- [jest/prefer-called-with](https://lintradar.dev/rules/jest/prefer-called-with.md): Suggest using `toHaveBeenCalledWith()`
- [jest/prefer-equality-matcher](https://lintradar.dev/rules/jest/prefer-equality-matcher.md): Suggest using the built-in equality matchers
- [jest/prefer-hooks-in-order](https://lintradar.dev/rules/jest/prefer-hooks-in-order.md): Prefer having hooks in a consistent order

---

Web page: https://lintradar.dev/rules/jest/consistent-test-it. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
