spatie / laravel-blade-comments

Add debug comments to your rendered output
https://freek.dev/2500-a-laravel-package-to-quickly-see-which-html-is-rendered-by-which-blade-view
MIT License
159 stars 9 forks source link

[Bug]: assertInertia() always fails when blade comments are enabled #8

Closed bsdnomad closed 11 months ago

bsdnomad commented 1 year ago

What happened?

Hi there,

I was headbanging a lot why some tests performing Inertia assertions began failing accidentally until I figured out it goes always like that when blade comments are enabled.

Disabling the extension in config/blade-comments.php allowing all the tests to pass successfully. Hope that is going to save some time and prevent a lot of troubles to anybody impacted by the issue.

How to reproduce the bug

Using a vanilla Jetstream + Inertia + Vue starter kit application installed do the following:

  1. Install the extension, publish config file as described in README page.
  2. Make sure APP_DEBUG is set to true in (testing) .env file
  3. Create invokable controller, create a route, render a Inertia page with a Vue component, extending default AppLayout, having one simple nested component inside (just a plain html chunk in a