|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
688 bytes
|
| Line | |
|---|
| 1 | # Suggest using `test.todo` (`prefer-todo`)
|
|---|
| 2 |
|
|---|
| 3 | When test cases are empty then it is better to mark them as `test.todo` as it
|
|---|
| 4 | will be highlighted in the summary output.
|
|---|
| 5 |
|
|---|
| 6 | ## Rule details
|
|---|
| 7 |
|
|---|
| 8 | This rule triggers a warning if empty test cases are used without 'test.todo'.
|
|---|
| 9 |
|
|---|
| 10 | ```js
|
|---|
| 11 | test('i need to write this test');
|
|---|
| 12 | ```
|
|---|
| 13 |
|
|---|
| 14 | ### Default configuration
|
|---|
| 15 |
|
|---|
| 16 | The following pattern is considered warning:
|
|---|
| 17 |
|
|---|
| 18 | ```js
|
|---|
| 19 | test('i need to write this test'); // Unimplemented test case
|
|---|
| 20 | test('i need to write this test', () => {}); // Empty test case body
|
|---|
| 21 | test.skip('i need to write this test', () => {}); // Empty test case body
|
|---|
| 22 | ```
|
|---|
| 23 |
|
|---|
| 24 | The following pattern is not warning:
|
|---|
| 25 |
|
|---|
| 26 | ```js
|
|---|
| 27 | test.todo('i need to write this test');
|
|---|
| 28 | ```
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.