Skip to content

Not a valid Inertia response #427

@ibrahim-999

Description

@ibrahim-999

First : thank you so much for InertiaJs, it's awesome ! slightly_smiling_face

i use
inertiajs/inertia-laravel 0.6.3
Laravel 8.40

i got this respones every time i run my test and i have checked everything,

sometime i use Assert insted of AssertableInertia

if someone could point me on the right direction i would be glad

use Inertia\Testing\AssertableInertia;

use RefreshDatabase;

public function test_home_page_sponsors(): void
    {
        $sponsors = Sponsor::factory()->count(5)->create();

        $this->get('/')
            ->assertInertia(fn (AssertableInertia $page) => $page
            ->component('HomePage')
            ->has('sponsors.data', 5)
            ->has(
                'sponsors.data.0',
                fn (AssertableInertia $page) => $page
                    ->where('title', $sponsors[0]->title)
                    ->etc()
            ));
    } 

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