mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
29 lines
662 B
PHP
29 lines
662 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Plugins\Tia\WatchDefaults;
|
|
|
|
use Composer\InstalledVersions;
|
|
use Pest\Plugins\Tia\Contracts\WatchDefault;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final readonly class Inertia implements WatchDefault
|
|
{
|
|
public function applicable(): bool
|
|
{
|
|
return class_exists(InstalledVersions::class)
|
|
&& (InstalledVersions::isInstalled('inertiajs/inertia-laravel')
|
|
|| InstalledVersions::isInstalled('rompetomp/inertia-bundle'));
|
|
}
|
|
|
|
public function defaults(string $projectRoot, string $testPath): array
|
|
{
|
|
return [
|
|
'resources/js/** !*.php' => [$testPath],
|
|
];
|
|
}
|
|
}
|