mirror of
https://github.com/pestphp/pest.git
synced 2026-12-03 22:45:06 +01:00
dc73ec009e
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
32 lines
776 B
PHP
32 lines
776 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Plugins\Tia\WatchDefaults;
|
|
|
|
use Pest\Plugins\Tia\Contracts\WatchDefault;
|
|
use Pest\Support\InstalledPackages;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final readonly class Livewire implements WatchDefault
|
|
{
|
|
public function applicable(): bool
|
|
{
|
|
return InstalledPackages::has('livewire/livewire');
|
|
}
|
|
|
|
public function defaults(string $projectRoot, string $testPath): array
|
|
{
|
|
return [
|
|
'resources/views/livewire/**/*.blade.php' => [$testPath],
|
|
'resources/views/components/**/*.blade.php' => [$testPath],
|
|
'resources/views/pages/**/*.blade.php' => [$testPath],
|
|
|
|
'resources/js/**/*.js' => [$testPath],
|
|
'resources/js/**/*.ts' => [$testPath],
|
|
];
|
|
}
|
|
}
|