Skip to content

Unexpected long waiting time when testing components with Volt #132

Open
@mondesirm

Description

@mondesirm

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:

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 using Volt::test always takes more than 20s.
  • Following tests (using Volt::test or not) are fast as expected.

Using a clean installation (filtering the tests so we have small examples to work with):

Image

Indeed, the test at the very top uses Volt.


Now, changing the order a bit:

Image

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

  1. Install Laravel's Livewire Starter Kit (+ Volt) using Herd.
  2. Run pest in the terminal once it's ready.
  3. Expect an odd waiting time, if not I am crazy or it's time to get a new PC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions