← All procedures
vitest.watch
Start vitest in watch mode (no shell; uses the project's own vitest)
CLI- Package
- @procedures/vitest · README
- Path
["vitest","watch"]- CLI
mark vitest watch- As data
{"$proc":["vitest","watch"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/vitest"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["vitest","watch"], {});
console.log(JSON.stringify(result));From the command line
$ mark vitest watch
As data, in a program
{ "$proc": ["vitest", "watch"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
cwd | string | no | | The folder of the project (default: the current folder) |
include | string[] | no | | Test files or patterns to watch (default: all tests) |
Output
| Field | Type | Required | Default | Description |
|---|
id | string | yes | | The id of the process in the process registry: vitest.stop takes it |
pid | number | yes | | The process id of vitest |
status | "started" | "stopped" | yes | | started, or stopped when vitest ended at once |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"cwd": {
"description": "The folder of the project (default: the current folder)",
"type": "string"
},
"include": {
"description": "Test files or patterns to watch (default: all tests)",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"output": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the process in the process registry: vitest.stop takes it"
},
"pid": {
"type": "number",
"description": "The process id of vitest"
},
"status": {
"type": "string",
"enum": [
"started",
"stopped"
],
"description": "started, or stopped when vitest ended at once"
}
},
"required": [
"id",
"pid",
"status"
],
"additionalProperties": {}
}
}