Linter · Rules
bun:test/warn-todo
Disallow .todo on test, it and describe
test.todo marks a test that nobody has written yet, or one that doesn't pass yet. bun test 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]
"bun:test/warn-todo" = "error" # or "warn"
Examples
Reported:
import { describe, test } from "bun:test";
test.todo("refunds the order");
describe.todo("checkout");
Not reported:
import { expect, test } from "bun:test";
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.