Fixes test suite

This commit is contained in:
Nuno Maduro
2024-04-27 11:36:22 +01:00
parent f49d1e0e18
commit cfa00da885
15 changed files with 161 additions and 51 deletions

View File

@ -60,20 +60,20 @@ test('junit with parallel', function () use ($normalizedPath, $run) {
expect($result['testsuite']['@attributes'])
->name->toBe('Tests\tests\SuccessOnly')
->file->toBe($normalizedPath('tests/.tests/SuccessOnly.php'))
->tests->toBe('1')
->assertions->toBe('1')
->tests->toBe('2')
->assertions->toBe('2')
->errors->toBe('0')
->failures->toBe('0')
->skipped->toBe('0');
expect($result['testsuite']['testcase'])
->toHaveCount(1);
->toHaveCount(2);
expect($result['testsuite']['testcase']['@attributes'])
expect($result['testsuite']['testcase'][0]['@attributes'])
->name->toBe('it can pass with comparison')
->file->toBe($normalizedPath('tests/.tests/SuccessOnly.php::it can pass with comparison'))
->class->toBe('Tests\tests\SuccessOnly')
->classname->toBe('Tests.tests.SuccessOnly')
->assertions->toBe('1')
->time->toStartWith('0.0');
});
})->skip('Not working yet');

View File

@ -2,8 +2,6 @@
use Symfony\Component\Process\Process;
beforeEach()->skip('Waiting for Parallel to be stable');
$run = function () {
$process = new Process(
array_merge(['php', 'bin/pest', '--parallel', '--processes=3'], func_get_args()),
@ -18,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, 16 skipped, 994 passed (2348 assertions)')
->toContain('Tests: 1 deprecated, 4 warnings, 5 incomplete, 2 notices, 13 todos, 16 skipped, 1017 passed (2483 assertions)')
->toContain('Parallel: 3 processes');
})->skipOnWindows();

View File

@ -30,7 +30,7 @@ test('todos', function () use ($run, $snapshot) {
test('todos in parallel', function () use ($run, $snapshot) {
expect($run('--todos', true))->toContain($snapshot('todos'));
})->skipOnWindows()->skip('Waiting for Parallel to be stable');
})->skipOnWindows();
test('todo', function () use ($run, $snapshot) {
expect($run('--todo', false))->toContain($snapshot('todo'));
@ -38,4 +38,4 @@ test('todo', function () use ($run, $snapshot) {
test('todo in parallel', function () use ($run, $snapshot) {
expect($run('--todo', true))->toContain($snapshot('todo'));
})->skipOnWindows()->skip('Waiting for Parallel to be stable');
})->skipOnWindows();