> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# prefer-todo

[Added in v0.4.2](https://github.com/web-infra-dev/rslint/releases/tag/v0.4.2)
## Configuration

| Preset                   | Configured Value |
| ------------------------ | ---------------- |
| ✅ jestPlugin.configs.all | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, jestPlugin } from '@rslint/core';

export default defineConfig([
  jestPlugin.configs.recommended,
  {
    rules: {
      'jest/prefer-todo': 'error',
    },
  },
]);
```

## Rule Details

Prefer test.todo('…') (or the same on it / describe-style test APIs) when a test is only a title, has an empty implementation (() => ), or is test.skip with an empty body. That makes unfinished work explicit in Jest’s reporting instead of looking like a passing or silently skipped test.
***

Examples of **incorrect** code for this rule:

```js
test('i need to write this test'); // Unimplemented test case
test('i need to write this test', () => {}); // Empty test case body
test.skip('i need to write this test', () => {}); // Empty test case body
```

Example of **correct** code for this rule:

```js
test.todo('i need to write this test');
```

## Original Documentation

- [eslint-plugin-jest: prefer-todo](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/docs/rules/prefer-todo.md)
- [Source code](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/src/rules/prefer-todo.ts)
