developing-with-turbo-tests
Skill by hotwired-laravel
Explains how to write PHPUnit or Pest feature tests for Turbo Laravel. It covers simulating Turbo, Turbo Frame and Hotwire Native requests, asserting Turbo Stream and redirect responses, and faking broadcasts. It is for Laravel developers who use Turbo.
Install developing-with-turbo-tests
Built from the published package, never by AI.
git clone --depth 1 https://github.com/hotwired-laravel/turbo-laravel /tmp/turbo-laravel && mkdir -p ~/.claude/skills && cp -r /tmp/turbo-laravel/resources/boost/skills/developing-with-turbo-tests ~/.claude/skills/developing-with-turbo-testsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install developing-with-turbo-tests in Claude Code
git clone --depth 1 https://github.com/hotwired-laravel/turbo-laravel /tmp/turbo-laravel && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/turbo-laravel/resources/boost/skills/developing-with-turbo-tests ~/.gemini/antigravity-cli/skills/developing-with-turbo-testsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install developing-with-turbo-tests in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill teaches an AI assistant how to test Turbo Laravel features in Laravel feature tests written with PHPUnit or Pest. It explains adding the InteractsWithTurbo trait to a test class and notes that the turbo-laravel.queue config is set to false during testing so broadcasts run synchronously.
It shows how to simulate Turbo Stream visits, Turbo Frame requests and Hotwire Native requests. It also covers assertions for Turbo Stream responses, Hotwire Native redirects (recede, resume and refresh), and broadcast checks using TurboStream::fake(). It is aimed at Laravel developers who build apps with Turbo and want test coverage for those behaviors.
Written from the project's SKILL.md and checked against it.
What it can do
- $this->turbo()Simulates a request that accepts Turbo Stream responses by setting the Accept header.
- $this->fromTurboFrame()Simulates a request from a specific Turbo Frame by setting the Turbo-Frame header.
- $this->hotwireNative()Simulates a request from a Hotwire Native mobile client.
- assertTurboStream()Asserts the response is a Turbo Stream, with an optional callback to check individual streams.
- assertNotTurboStream()Asserts the response is not a Turbo Stream.
- assertRedirectRecede() / assertRedirectResume() / assertRedirectRefresh()Asserts Hotwire Native redirect behavior with optional flash data.
- TurboStream::fake()Captures broadcasts without sending them so tests can inspect them.
- assertBroadcasted() / assertNothingWasBroadcasted()Asserts that a matching broadcast was sent, or that no broadcasts were sent.
- assertBroadcastedTimes()Asserts a broadcast matching a condition was sent a specific number of times.
What you need
- Laravel project with the Turbo Laravel package
- PHPUnit or Pest test setup
Try asking
- Write a feature test that asserts the store action returns a Turbo Stream.
- Add a test that fakes broadcasts and checks that creating a post broadcasts an append.
- Write a Hotwire Native test that asserts a recede redirect with a status flash message.
Good to know
- The turbo-laravel.queue config is set to false during testing, so broadcasts are processed synchronously.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: resources/boost/skills/developing-with-turbo-tests/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to developing-with-turbo-tests
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
developing-with-turbo-tests: common questions
What does the InteractsWithTurbo trait do?
The source says it provides test helpers for asserting Turbo-specific behavior in feature tests, such as simulating Turbo requests and asserting Turbo Stream responses. Add it to a test class or base TestCase.
Can I use these Turbo test helpers with Pest?
Yes. The source says Turbo Laravel tests can be written in either PHPUnit or Pest.
How do I test Turbo broadcasts without sending them?
Call TurboStream::fake() in the test, then use assertBroadcasted(), assertNothingWasBroadcasted() or assertBroadcastedTimes() to check what would have been broadcast.
How do I install developing-with-turbo-tests?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is developing-with-turbo-tests free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is developing-with-turbo-tests safe to use?
It scores 77 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to developing-with-turbo-tests?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
