Allows to set context on todos

This commit is contained in:
Nuno Maduro
2024-08-03 18:42:31 +01:00
parent 41e50cac05
commit 651aab560c
6 changed files with 62 additions and 9 deletions

View File

@ -1251,11 +1251,16 @@
✓ nested → it may be associated with an ticket #1, #4, #5, #6, #3
// an note between an the ticket
PASS Tests\Features\Todo - 3 todos
PASS Tests\Features\Todo - 7 todos
↓ something todo later
↓ something todo later chained
↓ something todo later chained and with function body
✓ it does something within a file with a todo
↓ it may have an associated assignee [@nunomaduro]
↓ it may have an associated issue #1
↓ it may have an associated PR #1
↓ it may have an associated note
// a note
WARN Tests\Features\Warnings
! warning → Undefined property: P\Tests\Features\Warnings::$fooqwdfwqdfqw
@ -1542,4 +1547,4 @@
WARN Tests\Visual\Version
- visual snapshot of help command output
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 24 skipped, 1078 passed (2632 assertions)
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 17 todos, 24 skipped, 1078 passed (2632 assertions)

View File

@ -1,3 +1,4 @@
TODO Tests\Features\BeforeEachProxiesToTestCallWithTodo - 4 todos
↓ is marked as todo 1
↓ is marked as todo 2
@ -14,10 +15,15 @@
↓ todo on describe → should not fail
↓ todo on describe → should run
TODO Tests\Features\Todo - 3 todos
TODO Tests\Features\Todo - 7 todos
↓ something todo later
↓ something todo later chained
↓ something todo later chained and with function body
↓ it may have an associated assignee [@nunomaduro]
↓ it may have an associated issue #1
↓ it may have an associated PR #1
↓ it may have an associated note
// a note
PASS Tests\CustomTestCase\ChildTest
✓ override method
@ -28,4 +34,4 @@
PASS Tests\CustomTestCase\ParentTest
✓ override method
Tests: 13 todos, 3 passed (3 assertions)
Tests: 17 todos, 3 passed (3 assertions)

View File

@ -1,3 +1,4 @@
TODO Tests\Features\BeforeEachProxiesToTestCallWithTodo - 4 todos
↓ is marked as todo 1
↓ is marked as todo 2
@ -14,10 +15,15 @@
↓ todo on describe → should not fail
↓ todo on describe → should run
TODO Tests\Features\Todo - 3 todos
TODO Tests\Features\Todo - 7 todos
↓ something todo later
↓ something todo later chained
↓ something todo later chained and with function body
↓ it may have an associated assignee [@nunomaduro]
↓ it may have an associated issue #1
↓ it may have an associated PR #1
↓ it may have an associated note
// a note
PASS Tests\CustomTestCase\ChildTest
✓ override method
@ -28,4 +34,4 @@
PASS Tests\CustomTestCase\ParentTest
✓ override method
Tests: 13 todos, 3 passed (3 assertions)
Tests: 17 todos, 3 passed (3 assertions)

View File

@ -11,3 +11,19 @@ test('something todo later chained and with function body', function () {
it('does something within a file with a todo', function () {
expect(true)->toBeTrue();
});
it('may have an associated assignee', function () {
expect(true)->toBeTrue();
})->todo(assignee: 'nunomaduro');
it('may have an associated issue', function () {
expect(true)->toBeTrue();
})->todo(issue: 1);
it('may have an associated PR', function () {
expect(true)->toBeTrue();
})->todo(pr: 1);
it('may have an associated note', function () {
expect(true)->toBeTrue();
})->todo(note: 'a note');

View File

@ -16,7 +16,7 @@ $run = function () {
test('parallel', function () use ($run) {
expect($run('--exclude-group=integration'))
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 1064 passed (2600 assertions)')
->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 17 todos, 19 skipped, 1064 passed (2600 assertions)')
->toContain('Parallel: 3 processes');
})->skipOnWindows();