Testing lazy props #604
Unanswered
captenmasin
asked this question in
Help
Replies: 3 comments 4 replies
-
Hey @claudiodekker, I know we've been asked about this before. Do we have a good solution for this yet? 🤔 |
Beta Was this translation helpful? Give feedback.
3 replies
-
This way works for me: $this
->withHeaders([
'X-Inertia-Partial-Component' => 'Home/Home',
'X-Inertia-Partial-Data' => 'users',
])
->get('/')
->assertOK()
->assertInertia(fn(AssertableInertia $page) => $page
->has('users')
->etc()
); Credits: https://twitter.com/djgeisi/status/1637803207324778498 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Just arrived here looking for how to test lazy props - would be great if we could have |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using the new test helpers
How would one assert that a prop exists when it's loaded via
Inertia::lazy()
?Beta Was this translation helpful? Give feedback.
All reactions