jest/prefer-todo 風格
用途
當測試案例為空時,最好將它們標記為 test.todo
,因為它將在摘要輸出中被突出顯示。
為何不好?
如果使用空的測試案例而沒有 'test.todo',此規則會觸發警告。
範例
javascript
test("i need to write this test"); // invalid
test("i need to write this test", () => {}); // invalid
test.skip("i need to write this test", () => {}); // invalid
test.todo("i need to write this test");