You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now you can group tests only by folders or name. This task is to research best practices in other testing libraries and how could we achieve categorising tests as "slow" or something different.
Examples using different testing libraries:
PHPUnit
/** @group slow */publicfunctiontest_something_slow(): void
{
// slow test code here
}
# Run only the slow tests
phpunit --group slow
# Exclude slow tests
phpunit --exclude-group slow
Pest
it('is a slow test')->group('slow', function () {
// slow test code here
});
# Run only slow tests
./vendor/bin/pest --group=slow
# Exclude slow tests
./vendor/bin/pest --exclude-group=slow
Jest
// Mark the test with "slow" in the nametest('slow: this is a slow test',()=>{// slow test code here});
You can then filter tests based on the test name when running Jest using --testNamePattern:
# Run only slow tests
jest --testNamePattern="slow"# Exclude slow tests (by excluding the "slow" pattern)
jest --testNamePattern="^((?!slow).)*$"
I think the best approach for bashunit is going into something similar like jest 🤔
The text was updated successfully, but these errors were encountered:
Right now you can group tests only by folders or name. This task is to research best practices in other testing libraries and how could we achieve categorising tests as "slow" or something different.
Examples using different testing libraries:
PHPUnit
Pest
Jest
You can then filter tests based on the test name when running Jest using --testNamePattern:
I think the best approach for bashunit is going into something similar like jest 🤔
The text was updated successfully, but these errors were encountered: