# bun:test/prefer-todo

> Require `test.todo` for tests that have no body yet

A test with an empty body passes, so the summary counts a test you haven't written yet as one that works. `bun test` counts a `test.todo` as todo, not as passed.

A test with only a title is reported too, and so is an empty `test.skip`.

`--fix` rewrites the call to `test.todo` and removes the empty function. A test with options, such as `{ timeout: 500 }`, is reported but not fixed.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"bun:test/prefer-todo" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad {"count": 3} */}
```ts
import { test } from "bun:test";

test("rejects an expired token", () => {});

test("refreshes the token");

test.skip("logs out", function () {});
```

Not reported:

{/* good */}
```ts
import { expect, test } from "bun:test";

test.todo("rejects an expired token");

test.todoIf(process.platform === "win32")("reads the keychain", () => {});

test("accepts a valid token", () => {
  expect(verify(token)).toBe(true);
});
```
