@ronyamin Make sure that you have installed composer require pestphp/pest-plugin-livewire --dev.
And also make sure that you have imported the use function Pest\Livewire\livewire; top of your file.
I went into the same issue, you can get some idea from this post: https://laravel-school.com/posts/filamentphp-testing-with-pest-call-to-undefined-function-pest
You might need to use composer dump-autoload at the end!