Ben Borgers

How to solve "Class 'Tests\Feature\Livewire' not found"

August 3, 2020

You're probably writing a Laravel test for a Livewire component.

The docs don't seem to mention that you need to import a package at the top of your test file first, like this:

use Livewire\Livewire;

Now, you can use Livewire::test in your tests!

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗