tests: add regression tests for depends

This commit is contained in:
Owen Voke
2020-11-13 10:52:56 +00:00
parent 01143a6f84
commit bb2474ccbe
2 changed files with 7 additions and 1 deletions

View File

@ -392,10 +392,12 @@
PASS Tests\Features\Depends
✓ first
✓ second
✓ it asserts true is true
✓ depends
✓ depends with ...params
✓ depends with defined arguments
✓ depends run test only once
✓ depends works with the correct test name
Tests: 7 skipped, 233 passed
Tests: 7 skipped, 235 passed

View File

@ -32,3 +32,7 @@ test('depends with defined arguments', function (string $first, string $second)
test('depends run test only once', function () use (&$runCounter) {
expect($runCounter)->toBe(2);
})->depends('first', 'second');
// Regression tests. See https://github.com/pestphp/pest/pull/216
it('asserts true is true')->assertTrue(true);
test('depends works with the correct test name')->assertTrue(true)->depends('it asserts true is true');