Skip to content

Commit b0d52c9

Browse files
authored
Merge branch 'main' into fix/9810-override-auto-fixtures
2 parents 6d7ba29 + 6eab30a commit b0d52c9

File tree

35 files changed

+1527
-838
lines changed

35 files changed

+1527
-838
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070

7171
- name: Get changed files
7272
id: changed-files
73-
uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a # v47.0.4
73+
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
7474
with:
7575
files: |
7676
docs/**

docs/api/advanced/plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is an advanced API. If you just want to [run tests](/guide/), you probably
1111
This guide assumes you know how to work with [Vite plugins](https://vite.dev/guide/api-plugin.html).
1212
:::
1313

14-
Vitest supports a `configureVitest` [plugin](https://vite.dev/guide/api-plugin.html) hook hook since version 3.1.
14+
Vitest supports a `configureVitest` [plugin](https://vite.dev/guide/api-plugin.html) hook since version 3.1.
1515

1616
::: code-group
1717
```ts [only vitest]

docs/config/reporters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Note that the [coverage](/guide/coverage) feature uses a different [`coverage.re
4242
- [`tap-flat`](/guide/reporters#tap-flat-reporter)
4343
- [`hanging-process`](/guide/reporters#hanging-process-reporter)
4444
- [`github-actions`](/guide/reporters#github-actions-reporter)
45+
- [`agent`](/guide/reporters#agent-reporter)
4546
- [`blob`](/guide/reporters#blob-reporter)
4647
4748
## Example

docs/guide/browser/visual-regression-testing.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ screenshots should use the service.
606606

607607
The cleanest approach is using [Test Projects](/guide/projects):
608608

609-
610609
```ts [vitest.config.ts]
611610
import { env } from 'node:process'
612611
import { defineConfig } from 'vitest/config'
@@ -663,7 +662,6 @@ export default defineConfig({
663662
})
664663
```
665664

666-
667665
Follow the [official guide to create a Playwright Workspace](https://learn.microsoft.com/en-us/azure/app-testing/playwright-workspaces/quickstart-run-end-to-end-tests?tabs=playwrightcli&pivots=playwright-test-runner#create-a-workspace).
668666

669667
Once your workspace is created, configure Vitest to use it:

docs/guide/cli-generated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Hide logs for skipped tests
102102
- **CLI:** `--reporter <name>`
103103
- **Config:** [reporters](/config/reporters)
104104

105-
Specify reporters (default, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions)
105+
Specify reporters (default, agent, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions)
106106

107107
### outputFile
108108

docs/guide/cli.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,4 +237,3 @@ Merges every blob report located in the specified folder (`.vitest-reports` by d
237237
```sh
238238
vitest --merge-reports --reporter=junit
239239
```
240-

docs/guide/reporters.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ This example will write separate JSON and XML reports as well as printing a verb
9898

9999
By default (i.e. if no reporter is specified), Vitest will display summary of running tests and their status at the bottom. Once a suite passes, its status will be reported on top of the summary.
100100

101+
::: tip
102+
When Vitest detects it is running inside an AI coding agent, the [`agent`](#agent-reporter) reporter is used instead to reduce output and minimize token usage. You can override this by explicitly configuring the [`reporters`](/config/reporters) option.
103+
:::
104+
101105
You can disable the summary by configuring the reporter:
102106

103107
:::code-group
@@ -637,6 +641,26 @@ export default defineConfig({
637641
})
638642
```
639643

644+
### Agent Reporter
645+
646+
Outputs a minimal report optimized for AI coding assistants and LLM-based workflows. Only failed tests and their error messages are displayed. Console logs from passing tests and the summary section are suppressed to reduce token usage.
647+
648+
This reporter is automatically enabled when no `reporters` option is configured and Vitest detects it is running inside an AI coding agent. If you configure custom reporters, you can explicitly add `agent`:
649+
650+
:::code-group
651+
```bash [CLI]
652+
npx vitest --reporter=agent
653+
```
654+
655+
```ts [vitest.config.ts]
656+
export default defineConfig({
657+
test: {
658+
reporters: ['agent']
659+
},
660+
})
661+
```
662+
:::
663+
640664
### Blob Reporter
641665

642666
Stores test results on the machine so they can be later merged using [`--merge-reports`](/guide/cli#merge-reports) command.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@vite-pwa/assets-generator": "^1.0.2",
2828
"@vite-pwa/vitepress": "^1.1.0",
2929
"@vitejs/plugin-vue": "catalog:",
30-
"@voidzero-dev/vitepress-theme": "^4.5.1",
30+
"@voidzero-dev/vitepress-theme": "^4.8.0",
3131
"https-localhost": "^4.7.1",
3232
"tinyglobby": "catalog:",
3333
"unocss": "catalog:",

examples/opentelemetry/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
# for testing open-telemetry integration locally
33
# https://www.jaegertracing.io/docs/2.12/getting-started/
44
jaeger:
5-
image: cr.jaegertracing.io/jaegertracing/jaeger:2.15.1
5+
image: cr.jaegertracing.io/jaegertracing/jaeger:2.16.0
66
# Assign ports for Jaeger UI and OTLP receiver
77
ports:
88
# UI http://localhost:16686

examples/opentelemetry/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
},
1010
"devDependencies": {
1111
"@opentelemetry/api": "^1.9.0",
12-
"@opentelemetry/context-zone": "^2.5.1",
13-
"@opentelemetry/exporter-trace-otlp-proto": "^0.212.0",
14-
"@opentelemetry/resources": "^2.5.1",
15-
"@opentelemetry/sdk-node": "^0.212.0",
16-
"@opentelemetry/sdk-trace-web": "^2.5.1",
12+
"@opentelemetry/context-zone": "^2.6.0",
13+
"@opentelemetry/exporter-trace-otlp-proto": "^0.213.0",
14+
"@opentelemetry/resources": "^2.6.0",
15+
"@opentelemetry/sdk-node": "^0.213.0",
16+
"@opentelemetry/sdk-trace-web": "^2.6.0",
1717
"@vitest/browser-playwright": "latest",
1818
"vite": "latest",
1919
"vitest": "latest"

0 commit comments

Comments
 (0)