tests: adds more tests regarding snapshots multiple

This commit is contained in:
Nuno Maduro
2023-08-02 23:02:00 +01:00
parent 43107c1743
commit 00109e9976
29 changed files with 79 additions and 26 deletions

View File

@ -1,5 +1,5 @@
Pest Testing Framework 2.11.0.
Pest Testing Framework 2.12.0.
USAGE: pest <file> [options]

View File

@ -1,3 +1,3 @@
Pest Testing Framework 2.11.0.
Pest Testing Framework 2.12.0.

View File

@ -698,6 +698,22 @@
✓ failures
✓ failures with custom message
✓ not failures
✓ multiple snapshot expectations
✓ multiple snapshot expectations with datasets with (1)
✓ multiple snapshot expectations with datasets with ('foo')
✓ multiple snapshot expectations with datasets with ('bar')
✓ multiple snapshot expectations with datasets with ('baz')
✓ describable → multiple snapshot expectations with describe
✓ multiple snapshot expectations with repeat @ repetition 1 of 10
✓ multiple snapshot expectations with repeat @ repetition 2 of 10
✓ multiple snapshot expectations with repeat @ repetition 3 of 10
✓ multiple snapshot expectations with repeat @ repetition 4 of 10
✓ multiple snapshot expectations with repeat @ repetition 5 of 10
✓ multiple snapshot expectations with repeat @ repetition 6 of 10
✓ multiple snapshot expectations with repeat @ repetition 7 of 10
✓ multiple snapshot expectations with repeat @ repetition 8 of 10
✓ multiple snapshot expectations with repeat @ repetition 9 of 10
✓ multiple snapshot expectations with repeat @ repetition 10 of 10
PASS Tests\Features\Expect\toStartWith
✓ pass
@ -1194,4 +1210,4 @@
WARN Tests\Visual\Version
- visual snapshot of help command output
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 844 passed (1947 assertions)
Tests: 2 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 19 skipped, 860 passed (1979 assertions)

View File

@ -132,3 +132,17 @@ test('multiple snapshot expectations with datasets', function () {
expect('foo bar 2')->toMatchSnapshot();
})->with([1, 'foo', 'bar', 'baz']);
describe('describable', function () {
test('multiple snapshot expectations with describe', function () {
expect('foo bar 1')->toMatchSnapshot();
expect('foo bar 2')->toMatchSnapshot();
});
});
test('multiple snapshot expectations with repeat', function () {
expect('foo bar 1')->toMatchSnapshot();
expect('foo bar 2')->toMatchSnapshot();
})->repeat(10);

View File

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