Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Linter · Rules

vitest/warn-todo

Disallow .todo on test, it and describe

test.todo marks a test that nobody has written yet. It doesn't check anything and the run still passes, so it's easy to forget, and the behavior it names stays untested.

Configure

Off by default. To turn it on:

bunfig.toml
[lint.rules]
"vitest/warn-todo" = "error" # or "warn"

Examples

Reported:

import { describe, test } from "vitest";

test.todo("refunds the order");

describe.todo("checkout");

Not reported:

import { expect, test } from "vitest";

test("refunds the order", () => {
  expect(refund(order).total).toBe(0);
});

When not to use it

If you use .todo to plan tests and read the list in the test output, this rule only repeats it.