Unexpected long waiting time when testing components with Volt
Volt Version
1.7
Laravel Version
12.2
PHP Version
8.4.5
Database Driver & Version
SQLite / MySQL 8.4.3
Description
Here's the context:
- I installed Laravel's Livewire Starter Kit (+ Volt) via Herd.
- A test is missing to achieve 100% coverage with Pest.
The tests are fast enough overall, I was going to make a PR to their repo but I realised the following:
- Each time I run
pest, the first test running and usingVolt::testalways takes more than 20s. - Following tests (using
Volt::testor not) are fast as expected.
Using a clean installation (filtering the tests so we have small examples to work with):
Indeed, the test at the very top uses Volt.
Now, changing the order a bit:
In this case, the first test in the list using Volt::test is "reset password link can be requested" (can be found here).
This time, the execution time was 27.32s instead of 0.22s (in the first screenshot).
Is it expected behavior? Does Volt need a first long initialisation so the other tests can run lightning fast?
Love Volt so far btw.
Steps To Reproduce
- Install Laravel's Livewire Starter Kit (+ Volt) using Herd.
- Run
pestin the terminal once it's ready. - Expect an odd waiting time, if not I am crazy or it's time to get a new PC.
Un-Volt-ing my tests like so do make my test suites run faster:
But all my tests become lengthier and I lose the convenience that Volt offers with the chained assertions among other things.