From b0d2ec55cc56babf4a3272558327894ce97cb1cb Mon Sep 17 00:00:00 2001 From: matt korwel Date: Thu, 15 Jan 2026 14:09:58 -0600 Subject: [PATCH] docs: clarify workspace test execution in GEMINI.md (#16764) --- GEMINI.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/GEMINI.md b/GEMINI.md index 3da20efb75..1752c32a20 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -15,6 +15,17 @@ project. While you can run the individual steps (`build`, `test`, `typecheck`, `lint`) separately, it is highly recommended to use `npm run preflight` to ensure a comprehensive validation. +## Running Tests in Workspaces\*\*: To run a specific test file within a + +workspace, use the command: +`npm test -w -- `. **CRITICAL**: The +`` MUST be relative to the workspace directory root, +NOT the project root. + +- _Example (Core package)_: + `npm test -w @google/gemini-cli-core -- src/routing/modelRouterService.test.ts` +- _Common workspaces_: `@google/gemini-cli`, `@google/gemini-cli-core`. + ## Writing Tests This project uses **Vitest** as its primary testing framework. When writing