zoki's avatar
Level 25

Pest BadMethodCallException caused by emit() in Jetstream

The default Jetstream Pest test returns an error:

FAILED  Tests\Feature\Auth\UpdatePasswordTest > password can be updated                                                                      
Method Laravel\Jetstream\Http\Livewire\UpdatePasswordForm::emit does not exist.

If we look at that line (vendor\laravel\jetstream\src\Http\Livewire\UpdatePasswordForm.php:46), we will find that it tries to execute emit() instead of, I guess, dispatch():

$this->emit('saved');

My Laravel app is v10.31 with Livewire v3.1, but it was upgraded from Laravel v9 and Livewire v2, therefore I am not sure if this is some upgrade step that I missed, or a genuine bug. Can anyone shed some light, please? Thanks!

0 likes
0 replies

Please or to participate in this conversation.