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#
example.ts2 problems
import { describe, test } from "bun:test";
test.todoThe use of .todo is not recommended.("refunds the order");
describe.todoThe use of .todo is not recommended.("checkout");example.tsNo problems
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.