Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestCase::withoutVite breaks React app during testing #43039

Closed
mabdullahsari opened this issue Jul 2, 2022 · 0 comments · Fixed by #43040
Closed

TestCase::withoutVite breaks React app during testing #43039

mabdullahsari opened this issue Jul 2, 2022 · 0 comments · Fixed by #43040

Comments

@mabdullahsari
Copy link
Contributor

  • Laravel Version: 9.19.0
  • PHP Version: 8.1.7
  • Database Driver & Version: PostgreSQL 14

Description:

The @viteReactRefresh directive crashes the application when withoutVite is used during testing.

Error message: Call to undefined method Closure::reactRefresh() (View: /Users/muhammedsari/Sites/redacted/resources/views/app.blade.php)

Steps To Reproduce:

Add the directive combo to your template

@viteReactRefresh
@vite('resources/js/platform.jsx')

Call $this->withoutVite() in your TestCase::setUp() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant