Too Long; Didn't Read
The error message "A facade root has not been set" generally indicates an issue with the configuration of a Laravel facade. This problem can specifically arise when the Laravel application is not adequately booted, especially during test execution. To resolve this issue, the following line was added to the tests/Pest.php file: TestsTestCase::class,)-in('Unit');