feat: adds pest function

This commit is contained in:
Nuno Maduro
2024-05-14 01:58:44 +01:00
parent 8169382362
commit c919bb5bc4
12 changed files with 293 additions and 14 deletions

View File

@ -3,6 +3,7 @@
declare(strict_types=1);
use Pest\Concerns\Expectable;
use Pest\Configuration;
use Pest\Exceptions\AfterAllWithinDescribe;
use Pest\Exceptions\BeforeAllWithinDescribe;
use Pest\Expectation;
@ -108,6 +109,16 @@ if (! function_exists('uses')) {
}
}
if (! function_exists('pest')) {
/**
* Creates a new Pest configuration instance.
*/
function pest(): Configuration
{
return Configuration::getInstance();
}
}
if (! function_exists('test')) {
/**
* Adds the given closure as a test. The first argument