# valid-describe-callback

Rule `jest/valid-describe-callback`. Enforce valid `describe()` callback

- Source: jest
- Technologies: Testing
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 16.7M weekly downloads of presets that enable it
- Trend: +10.1% last quarter
- Rank: #665 by reach, #1472 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jest/valid-describe-callback` | yes | no | package `eslint-plugin-jest` | [docs](https://github.com/jest-community/eslint-plugin-jest/blob/v29.17.2/docs/rules/valid-describe-callback.md) |
| Oxlint | `jest/valid-describe-callback` | no | no | plugin `jest`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/jest/valid-describe-callback.html) |

## Code examples

### Incorrect: the rule reports this

```js
// Async callback functions are not allowed
describe('myFunction()', async () => {
  // ...
});

// Callback function parameters are not allowed
describe('myFunction()', done => {
  // ...
});

// Returning a value from a describe block is not allowed
describe('myFunction', () =>
  it('returns a truthy value', () => {
    expect(myFunction()).toBeTruthy();
}));
```

Examples from the Oxlint documentation.

## Enable it

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

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

export default [
  {
    plugins: { jest },
    rules: {
      "jest/valid-describe-callback": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "jest"
  ],
  "rules": {
    "jest/valid-describe-callback": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Jest recommended](https://lintradar.dev/presets/jest-recommended.md) | ESLint | `eslint-plugin-jest` | 19 | 16.7M | +10.1% |

## Related rules

- [vitest/valid-describe-callback](https://lintradar.dev/rules/vitest/valid-describe-callback.md): Enforce valid describe callback
- [jest/no-test-prefixes](https://lintradar.dev/rules/jest/no-test-prefixes.md): Require using `.only` and `.skip` over `f` and `x`
- [jest/valid-expect-in-promise](https://lintradar.dev/rules/jest/valid-expect-in-promise.md): Require promises that have expectations in their chain to be valid
- [jest/no-mocks-import](https://lintradar.dev/rules/jest/no-mocks-import.md): Disallow manually importing from `__mocks__`
- [jest/no-interpolation-in-snapshots](https://lintradar.dev/rules/jest/no-interpolation-in-snapshots.md): Disallow string interpolation inside snapshots
- [jest/no-deprecated-functions](https://lintradar.dev/rules/jest/no-deprecated-functions.md): Disallow use of deprecated functions

---

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