Six coding tools for running a repository’s test command

Compare ways to run the right package test from an agent worktree, named editor task, or terminal command.

Use Unstoppable Code when review happens in an agent’s worktree chat. You can pick an approved repository script in that chat and run it in the worktree you’re reviewing. VS Code and Zed are good choices when the team wants named tasks with explicit working directories checked into the repository.

Run both suites in the checkout you plan to review

You’re reviewing a checkout-form fix in a local checkout-fix worktree. The form lives in apps/web and calls packages/api. Both packages define npm test, and you want to run Test web and Test API separately so you can identify which suite failed. Use a trusted checkout with the expected Node and npm versions. Install the repository’s dependencies and set up its test fixtures first. The terminal examples assume a POSIX-style shell.

Open checkout-fix in your tool. On the first run of each shortcut, check the terminal’s working directory or the runner’s package banner, then record the exit status for that suite. A green result from the API suite tells you little about whether the web form still works. A successful run from the main checkout tells you little about the patch.

Discover the scripts or define the package directory

  1. Unstoppable Code desktop. Open the worktree’s Code chat and type ! to see the suggested repository scripts. Review the discovered test entries in Scripts and hooks and approve the ones you intend to use. Return to the worktree chat and select the approved entry. Inspect the command before choosing Run terminal command. Repeat for the other package. The composer guide documents a new terminal in the chat’s worktree and direct execution by the user. The release notes document discovery and approval. Where duplicate entries are hard to distinguish, the composer also accepts an explicit root-relative command such as cd apps/web && npm test. Composer guide · Version 1.15.0 release notes

  2. VS Code. Open the worktree root as a folder. Run Tasks: Run Task and select the detected npm test task if its package is clear in the picker. For durable labels, add .vscode/tasks.json entries of type shell, each with command set to npm test. Set options.cwd to ${workspaceFolder}/apps/web for Test web and ${workspaceFolder}/packages/api for Test API. Run each by label and inspect its task terminal. Detection saves setup when the package is easy to identify. Explicit tasks make the directory visible in code review. VS Code tasks documentation

  3. Zed. Open the worktree as the project root and use zed: open project tasks to edit .zed/tasks.json. Add two entries with distinct label values, command set to npm test, and cwd set to $ZED_WORKTREE_ROOT/apps/web or $ZED_WORKTREE_ROOT/packages/api. Run each with task: spawn. After fixing a failure, task: rerun repeats the most recently spawned task, so check which suite ran last before using it. Zed’s default working directory is the project root, which is why the two cwd values matter here. Zed task documentation

Launch the suites from a worktree toolbar or terminal

  1. Orca. Under Settings → Quick Commands, create Test web and Test API with Project scope. Use cd apps/web && npm test and cd packages/api && npm test respectively. In the checkout-fix worktree, select each command from the tab-bar Quick Commands menu. The tab-bar route opens a fresh terminal in that worktree. The terminal context menu can insert a command into the current terminal, where a prior directory change can affect these relative paths. Orca Quick Commands documentation

  2. cmux. Add two named shell entries to the project’s .cmux/cmux.json. For the web entry, use cd "$(git rev-parse --show-toplevel)" && cd apps/web && npm test. Use the same pattern with packages/api for the API entry. Reload the configuration, focus an idle terminal anywhere inside checkout-fix, then select each entry from the Command Palette. cmux types a simple command into the focused terminal. The Git-root step handles a terminal already inside a subdirectory, while your choice of terminal still determines which checkout runs. cmux custom commands documentation

  3. Warp. Save two YAML files under the worktree’s .warp/workflows/, giving each a name and a command. Use the same Git-root commands as in the cmux example. From a Warp shell inside checkout-fix, open Workflow Search, find the named repository workflow, and select it. Repeat for the other suite. Repository YAML gives a Warp-using team the same launch names. Each developer still needs to start from the intended worktree. Warp YAML workflows documentation

Both scripts may be named test. Confirm which package and working directory the output shows. Use a package-specific command or task when the script picker leaves that ambiguous.

Cookie preferences

Optional cookies measure ads and feature usage, and improve the site with session recordings. Change anytime. Privacy policy