From 6968094e2b04624f508d594bebcb035ce1c71d66 Mon Sep 17 00:00:00 2001 From: jshayes Date: Sun, 13 Oct 2024 10:39:17 -0400 Subject: [PATCH] Add tests --- tests/.pest/snapshots/Visual/Todo/todo.snap | 46 +++++++- .../Visual/Todo/todo_in_parallel.snap | 46 +++++++- tests/.pest/snapshots/Visual/Todo/todos.snap | 46 +++++++- .../Visual/Todo/todos_in_parallel.snap | 46 +++++++- tests/.snapshots/success.txt | 53 ++++++++- tests/Features/DatasetsTests.php | 15 +++ tests/Features/Depends.php | 4 + tests/Features/Skip.php | 8 ++ tests/Features/Todo.php | 102 ++++++++++++++++++ tests/Visual/Parallel.php | 2 +- 10 files changed, 357 insertions(+), 11 deletions(-) diff --git a/tests/.pest/snapshots/Visual/Todo/todo.snap b/tests/.pest/snapshots/Visual/Todo/todo.snap index e9939bf8..5ab4f7fa 100644 --- a/tests/.pest/snapshots/Visual/Todo/todo.snap +++ b/tests/.pest/snapshots/Visual/Todo/todo.snap @@ -15,7 +15,7 @@ ↓ todo on describe → should not fail ↓ todo on describe → should run - TODO Tests\Features\Todo - 11 todos + TODO Tests\Features\Todo - 28 todos ↓ something todo later ↓ something todo later chained ↓ something todo later chained and with function body @@ -25,9 +25,51 @@ ↓ it may have an associated note // a note ↓ todo on describe → todo block → nested inside todo block → it should not execute + ↓ todo on describe → todo block → nested inside todo block → it should set the note + // hi + ↓ todo on describe → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on describe → todo block → it should not execute + ↓ todo on test after describe block + ↓ todo with note on test after describe block + // test note ↓ todo on beforeEach → todo block → nested inside todo block → it should not execute + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on beforeEach → todo block → it should not execute + ↓ todo on test after describe block with beforeEach + ↓ todo with note on test after describe block with beforeEach + // test note PASS Tests\CustomTestCase\ChildTest ✓ override method @@ -38,6 +80,6 @@ PASS Tests\CustomTestCase\ParentTest ✓ override method - Tests: 21 todos, 3 passed (7 assertions) + Tests: 38 todos, 3 passed (20 assertions) Duration: x.xxs diff --git a/tests/.pest/snapshots/Visual/Todo/todo_in_parallel.snap b/tests/.pest/snapshots/Visual/Todo/todo_in_parallel.snap index e9939bf8..5ab4f7fa 100644 --- a/tests/.pest/snapshots/Visual/Todo/todo_in_parallel.snap +++ b/tests/.pest/snapshots/Visual/Todo/todo_in_parallel.snap @@ -15,7 +15,7 @@ ↓ todo on describe → should not fail ↓ todo on describe → should run - TODO Tests\Features\Todo - 11 todos + TODO Tests\Features\Todo - 28 todos ↓ something todo later ↓ something todo later chained ↓ something todo later chained and with function body @@ -25,9 +25,51 @@ ↓ it may have an associated note // a note ↓ todo on describe → todo block → nested inside todo block → it should not execute + ↓ todo on describe → todo block → nested inside todo block → it should set the note + // hi + ↓ todo on describe → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on describe → todo block → it should not execute + ↓ todo on test after describe block + ↓ todo with note on test after describe block + // test note ↓ todo on beforeEach → todo block → nested inside todo block → it should not execute + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on beforeEach → todo block → it should not execute + ↓ todo on test after describe block with beforeEach + ↓ todo with note on test after describe block with beforeEach + // test note PASS Tests\CustomTestCase\ChildTest ✓ override method @@ -38,6 +80,6 @@ PASS Tests\CustomTestCase\ParentTest ✓ override method - Tests: 21 todos, 3 passed (7 assertions) + Tests: 38 todos, 3 passed (20 assertions) Duration: x.xxs diff --git a/tests/.pest/snapshots/Visual/Todo/todos.snap b/tests/.pest/snapshots/Visual/Todo/todos.snap index e9939bf8..5ab4f7fa 100644 --- a/tests/.pest/snapshots/Visual/Todo/todos.snap +++ b/tests/.pest/snapshots/Visual/Todo/todos.snap @@ -15,7 +15,7 @@ ↓ todo on describe → should not fail ↓ todo on describe → should run - TODO Tests\Features\Todo - 11 todos + TODO Tests\Features\Todo - 28 todos ↓ something todo later ↓ something todo later chained ↓ something todo later chained and with function body @@ -25,9 +25,51 @@ ↓ it may have an associated note // a note ↓ todo on describe → todo block → nested inside todo block → it should not execute + ↓ todo on describe → todo block → nested inside todo block → it should set the note + // hi + ↓ todo on describe → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on describe → todo block → it should not execute + ↓ todo on test after describe block + ↓ todo with note on test after describe block + // test note ↓ todo on beforeEach → todo block → nested inside todo block → it should not execute + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on beforeEach → todo block → it should not execute + ↓ todo on test after describe block with beforeEach + ↓ todo with note on test after describe block with beforeEach + // test note PASS Tests\CustomTestCase\ChildTest ✓ override method @@ -38,6 +80,6 @@ PASS Tests\CustomTestCase\ParentTest ✓ override method - Tests: 21 todos, 3 passed (7 assertions) + Tests: 38 todos, 3 passed (20 assertions) Duration: x.xxs diff --git a/tests/.pest/snapshots/Visual/Todo/todos_in_parallel.snap b/tests/.pest/snapshots/Visual/Todo/todos_in_parallel.snap index e9939bf8..5ab4f7fa 100644 --- a/tests/.pest/snapshots/Visual/Todo/todos_in_parallel.snap +++ b/tests/.pest/snapshots/Visual/Todo/todos_in_parallel.snap @@ -15,7 +15,7 @@ ↓ todo on describe → should not fail ↓ todo on describe → should run - TODO Tests\Features\Todo - 11 todos + TODO Tests\Features\Todo - 28 todos ↓ something todo later ↓ something todo later chained ↓ something todo later chained and with function body @@ -25,9 +25,51 @@ ↓ it may have an associated note // a note ↓ todo on describe → todo block → nested inside todo block → it should not execute + ↓ todo on describe → todo block → nested inside todo block → it should set the note + // hi + ↓ todo on describe → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on describe → todo block → it should not execute + ↓ todo on test after describe block + ↓ todo with note on test after describe block + // test note ↓ todo on beforeEach → todo block → nested inside todo block → it should not execute + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on beforeEach → todo block → it should not execute + ↓ todo on test after describe block with beforeEach + ↓ todo with note on test after describe block with beforeEach + // test note PASS Tests\CustomTestCase\ChildTest ✓ override method @@ -38,6 +80,6 @@ PASS Tests\CustomTestCase\ParentTest ✓ override method - Tests: 21 todos, 3 passed (7 assertions) + Tests: 38 todos, 3 passed (20 assertions) Duration: x.xxs diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index acf5bedf..1eaf4598 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -187,6 +187,10 @@ ✓ with on nested describe → nested → describe → it should include the with value from all parent describe blocks with (1) / (2) ✓ with on nested describe → nested → describe → should include the with value from all parent describe blocks and the test with (1) / (2) / (3) ✓ with on nested describe → nested → after inner describe block with (1) + ✓ after describe block with (5) + ✓ it may be used with high order after describe block with dataset "formal" + ✓ it may be used with high order after describe block with dataset "informal" + ✓ after describe block with named dataset with ('after') PASS Tests\Features\Depends ✓ first @@ -203,6 +207,7 @@ ✓ describe block → nested describe → first in nested describe ✓ describe block → nested describe → second in nested describe ✓ describe block → nested describe → third in nested describe + ✓ depends on test after describe block PASS Tests\Features\DependsInheritance ✓ it is a test @@ -1307,6 +1312,8 @@ - skip on beforeEach → skipped tests → nested inside skipped block → it should not execute - skip on beforeEach → skipped tests → it should not execute ✓ skip on beforeEach → it should execute + ✓ it does not skip after the describe block + - it can skip after the describe block WARN Tests\Features\SkipOnPhp ✓ it can run on php version @@ -1327,7 +1334,7 @@ ✓ nested → it may be associated with an ticket #1, #4, #5, #6, #3 // an note between an the ticket - PASS Tests\Features\Todo - 11 todos + PASS Tests\Features\Todo - 28 todos ↓ something todo later ↓ something todo later chained ↓ something todo later chained and with function body @@ -1338,11 +1345,53 @@ ↓ it may have an associated note // a note ↓ todo on describe → todo block → nested inside todo block → it should not execute + ↓ todo on describe → todo block → nested inside todo block → it should set the note + // hi + ↓ todo on describe → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on describe → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on describe → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on describe → todo block → it should not execute ✓ todo on describe → it should execute + ↓ todo on test after describe block + ↓ todo with note on test after describe block + // test note ↓ todo on beforeEach → todo block → nested inside todo block → it should not execute + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test without a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note to a test with a todo + // describe note + ↓ todo on beforeEach → todo block → describe with note → it should apply the note as well as the note from the test + // describe note + // test note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test without a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes to a test with a todo + // describe note + // nested describe note + ↓ todo on beforeEach → todo block → describe with note → nested describe with note → it should apply all parent notes as well as the note from the test + // describe note + // nested describe note + // test note ↓ todo on beforeEach → todo block → it should not execute ✓ todo on beforeEach → it should execute + ↓ todo on test after describe block with beforeEach + ↓ todo with note on test after describe block with beforeEach + // test note WARN Tests\Features\Warnings ! warning → Undefined property: P\Tests\Features\Warnings::$fooqwdfwqdfqw @@ -1649,4 +1698,4 @@ WARN Tests\Visual\Version - visual snapshot of help command output - Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 21 todos, 32 skipped, 1138 passed (2719 assertions) \ No newline at end of file + Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 33 skipped, 1144 passed (2736 assertions) \ No newline at end of file diff --git a/tests/Features/DatasetsTests.php b/tests/Features/DatasetsTests.php index a2ff44ee..54cb77a8 100644 --- a/tests/Features/DatasetsTests.php +++ b/tests/Features/DatasetsTests.php @@ -414,3 +414,18 @@ function () { }); })->with([1]); }); + +test('after describe block', function (...$args) { + expect($args)->toBe([5]); +})->with([5]); + +it('may be used with high order after describe block') + ->with('greeting-string') + ->expect(fn (string $greeting) => $greeting) + ->throwsNoExceptions(); + +dataset('after-describe', ['after']); + +test('after describe block with named dataset', function (...$args) { + expect($args)->toBe(['after']); +})->with('after-describe'); diff --git a/tests/Features/Depends.php b/tests/Features/Depends.php index 0592b98b..82f45c05 100644 --- a/tests/Features/Depends.php +++ b/tests/Features/Depends.php @@ -72,3 +72,7 @@ })->depends('second in nested describe'); }); }); + +test('depends on test after describe block', function () use (&$runCounter) { + expect($runCounter)->toBe(2); +})->depends('first', 'second'); diff --git a/tests/Features/Skip.php b/tests/Features/Skip.php index de12cf02..35218945 100644 --- a/tests/Features/Skip.php +++ b/tests/Features/Skip.php @@ -124,3 +124,11 @@ expect($this->ran)->toBe(true); }); }); + +it('does not skip after the describe block', function () { + expect(true)->toBeTrue(); +}); + +it('can skip after the describe block', function () { + expect(true)->toBeTrue(); +})->skip(); diff --git a/tests/Features/Todo.php b/tests/Features/Todo.php index eaa6d025..f979a2ff 100644 --- a/tests/Features/Todo.php +++ b/tests/Features/Todo.php @@ -36,6 +36,13 @@ afterEach(function () { match ($this->name()) { '__pest_evaluable__todo_on_describe__→__todo_block__→__nested_inside_todo_block__→_it_should_not_execute' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__nested_inside_todo_block__→_it_should_set_the_note' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_to_a_test_without_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_to_a_test_with_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_as_well_as_the_note_from_the_test' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_to_a_test_without_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_to_a_test_with_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_describe__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_as_well_as_the_note_from_the_test' => expect($this->ran)->toBe(false), '__pest_evaluable__todo_on_describe__→__todo_block__→_it_should_not_execute' => expect($this->ran)->toBe(false), '__pest_evaluable__todo_on_describe__→_it_should_execute' => expect($this->ran)->toBe(true), default => $this->fail('Unexpected test name: '.$this->name()), @@ -48,8 +55,47 @@ $this->ran = true; $this->fail(); }); + + it('should set the note', function () { + $this->ran = true; + $this->fail(); + })->todo(note: 'hi'); }); + describe('describe with note', function () { + it('should apply the note to a test without a todo', function () { + $this->ran = true; + $this->fail(); + }); + + it('should apply the note to a test with a todo', function () { + $this->ran = true; + $this->fail(); + })->todo(); + + it('should apply the note as well as the note from the test', function () { + $this->ran = true; + $this->fail(); + })->todo(note: 'test note'); + + describe('nested describe with note', function () { + it('should apply all parent notes to a test without a todo', function () { + $this->ran = true; + $this->fail(); + }); + + it('should apply all parent notes to a test with a todo', function () { + $this->ran = true; + $this->fail(); + })->todo(); + + it('should apply all parent notes as well as the note from the test', function () { + $this->ran = true; + $this->fail(); + })->todo(note: 'test note'); + })->todo(note: 'nested describe note'); + })->todo(note: 'describe note'); + it('should not execute', function () { $this->ran = true; $this->fail(); @@ -62,6 +108,14 @@ }); }); +test('todo on test after describe block', function () { + $this->fail(); +})->todo(); + +test('todo with note on test after describe block', function () { + $this->fail(); +})->todo(note: 'test note'); + describe('todo on beforeEach', function () { beforeEach(function () { $this->ran = false; @@ -71,6 +125,12 @@ match ($this->name()) { '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__nested_inside_todo_block__→_it_should_not_execute' => expect($this->ran)->toBe(false), '__pest_evaluable__todo_on_beforeEach__→__todo_block__→_it_should_not_execute' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_to_a_test_without_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_to_a_test_with_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→_it_should_apply_the_note_as_well_as_the_note_from_the_test' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_to_a_test_without_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_to_a_test_with_a_todo' => expect($this->ran)->toBe(false), + '__pest_evaluable__todo_on_beforeEach__→__todo_block__→__describe_with_note__→__nested_describe_with_note__→_it_should_apply_all_parent_notes_as_well_as_the_note_from_the_test' => expect($this->ran)->toBe(false), '__pest_evaluable__todo_on_beforeEach__→_it_should_execute' => expect($this->ran)->toBe(true), default => $this->fail('Unexpected test name: '.$this->name()), }; @@ -86,6 +146,40 @@ }); }); + describe('describe with note', function () { + it('should apply the note to a test without a todo', function () { + $this->ran = true; + $this->fail(); + }); + + it('should apply the note to a test with a todo', function () { + $this->ran = true; + $this->fail(); + })->todo(); + + it('should apply the note as well as the note from the test', function () { + $this->ran = true; + $this->fail(); + })->todo(note: 'test note'); + + describe('nested describe with note', function () { + it('should apply all parent notes to a test without a todo', function () { + $this->ran = true; + $this->fail(); + }); + + it('should apply all parent notes to a test with a todo', function () { + $this->ran = true; + $this->fail(); + })->todo(); + + it('should apply all parent notes as well as the note from the test', function () { + $this->ran = true; + $this->fail(); + })->todo(note: 'test note'); + })->todo(note: 'nested describe note'); + })->todo(note: 'describe note'); + it('should not execute', function () { $this->ran = true; $this->fail(); @@ -97,3 +191,11 @@ expect($this->ran)->toBe(true); }); }); + +test('todo on test after describe block with beforeEach', function () { + $this->fail(); +})->todo(); + +test('todo with note on test after describe block with beforeEach', function () { + $this->fail(); +})->todo(note: 'test note'); diff --git a/tests/Visual/Parallel.php b/tests/Visual/Parallel.php index ae7e86f2..313f8208 100644 --- a/tests/Visual/Parallel.php +++ b/tests/Visual/Parallel.php @@ -16,7 +16,7 @@ test('parallel', function () use ($run) { expect($run('--exclude-group=integration')) - ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 21 todos, 23 skipped, 1128 passed (2695 assertions)') + ->toContain('Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 38 todos, 24 skipped, 1134 passed (2712 assertions)') ->toContain('Parallel: 3 processes'); })->skipOnWindows();