HomeUpdatesGitHub
Docs/Commands/Tests

Tests

Set up unit testing or explicitly add a repeatable browser harness using one command.

Commandscommandtestsunit-testing

Choose the setup

Run these in your AI chat. Codex uses $tests with the same arguments.

Command Purpose
/tests Set up stack-native unit testing
/tests unit Explicitly select unit setup
/tests browser Set up a repeatable browser harness

Only the selected setup instructions are loaded. A runner name alone does not authorize browser automation: /tests Playwright requires clarification. An explicit request to set up browser testing selects browser mode.

Unit setup

The skill detects the stack, reuses an existing runner or adds the stack-native choice, adds one small working example, and records the real test command in AGENTS.md. It runs the resulting checks; an empty suite is not a pass.

Once a test command is declared, logic-bearing implementation steps must include relevant tests and keep the suite green. If Verify already exists, unit setup adds the test command between typechecking and the build while preserving existing checks. It does not create CI.

Browser setup

/tests browser reuses an established runner. For compatible JavaScript or TypeScript web and extension projects without one, it prefers Playwright. It adds one real smoke flow and documents the exact command as Browser tests in AGENTS.md.

Browser setup stays optional. Dependency and browser downloads retain their approval boundaries. Browser tests are not added to Verify or GitHub Actions unless you explicitly choose that slower gate or the project already requires it.

Later Feature, Implement, Check, and Continuous runs can reuse the documented harness. Continuous never installs browser tooling mid-feature.

For extensions, a persistent browser context can load the built extension. Real toolbar interactions, browser chrome, authenticated profiles, and visual fidelity may still require direct verification or a manual guide.

Scope

Neither mode builds a broad test suite or coverage policy. The setup proves the testing path; individual features add focused coverage later. Run CI separately to configure automatic GitHub checks.

The former /browser-tests command is replaced by /tests browser. See migration guidance.

Documentation

Search AI Blueprint

Start typing to search the documentation.