diff --git a/.gitignore b/.gitignore
index 996a288e1..571d24854 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,6 @@ test/cli/fixtures/browser-multiple/basic-*
# exclude static html reporter folder
test/browser/html/
test/core/html/
-.vitest-attachments
+.vitest
explainFiles.txt
.vitest-dump
diff --git a/docs/config/attachmentsdir.md b/docs/config/attachmentsdir.md
index 993fa9f83..14867d75f 100644
--- a/docs/config/attachmentsdir.md
+++ b/docs/config/attachmentsdir.md
@@ -6,6 +6,6 @@ outline: deep
# attachmentsDir
- **Type:** `string`
-- **Default:** `'.vitest-attachments'`
+- **Default:** `'.vitest/attachments'`
Directory path for storing attachments created by [`context.annotate`](/guide/test-context#annotate) relative to the project root.
diff --git a/docs/guide/browser/visual-regression-testing.md b/docs/guide/browser/visual-regression-testing.md
index ad088764e..75a877bdc 100644
--- a/docs/guide/browser/visual-regression-testing.md
+++ b/docs/guide/browser/visual-regression-testing.md
@@ -302,10 +302,10 @@ Reference screenshot:
tests/__screenshots__/button.test.ts/button-chromium-darwin.png
Actual screenshot:
- tests/.vitest-attachments/button.test.ts/button-chromium-darwin-actual.png
+ tests/.vitest/attachments/button.test.ts/button-chromium-darwin-actual.png
Diff image:
- tests/.vitest-attachments/button.test.ts/button-chromium-darwin-diff.png
+ tests/.vitest/attachments/button.test.ts/button-chromium-darwin-diff.png
```
### Understanding the diff image
diff --git a/docs/guide/cli-generated.md b/docs/guide/cli-generated.md
index 4fc81a517..abdd2dad5 100644
--- a/docs/guide/cli-generated.md
+++ b/docs/guide/cli-generated.md
@@ -865,7 +865,7 @@ Collect test and suite locations in the `location` property
- **CLI:** `--attachmentsDir
`
- **Config:** [attachmentsDir](/config/attachmentsdir)
-The directory where attachments from `context.annotate` are stored in (default: `.vitest-attachments`)
+The directory where attachments from `context.annotate` are stored in (default: `.vitest/attachments`)
### run
diff --git a/docs/guide/improving-performance.md b/docs/guide/improving-performance.md
index efbbc804d..baca0c6cd 100644
--- a/docs/guide/improving-performance.md
+++ b/docs/guide/improving-performance.md
@@ -178,7 +178,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: blob-attachments-${{ matrix.shardIndex }}
- path: .vitest-attachments/**
+ path: .vitest/**
include-hidden-files: true
retention-days: 1
@@ -209,7 +209,7 @@ jobs:
- name: Download attachments from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
- path: .vitest-attachments
+ path: .vitest
pattern: blob-attachments-*
merge-multiple: true
diff --git a/packages/vitest/src/node/cli/cli-config.ts b/packages/vitest/src/node/cli/cli-config.ts
index 1357d2912..573d10cb4 100644
--- a/packages/vitest/src/node/cli/cli-config.ts
+++ b/packages/vitest/src/node/cli/cli-config.ts
@@ -821,7 +821,7 @@ export const cliOptionsConfig: VitestCLIOptions = {
description: 'Collect test and suite locations in the `location` property',
},
attachmentsDir: {
- description: 'The directory where attachments from `context.annotate` are stored in (default: `.vitest-attachments`)',
+ description: 'The directory where attachments from `context.annotate` are stored in (default: `.vitest/attachments`)',
argument: '',
},
diff --git a/packages/vitest/src/node/config/resolveConfig.ts b/packages/vitest/src/node/config/resolveConfig.ts
index f3cd3f32f..3470fe63c 100644
--- a/packages/vitest/src/node/config/resolveConfig.ts
+++ b/packages/vitest/src/node/config/resolveConfig.ts
@@ -568,7 +568,7 @@ export function resolveConfig(
resolved.attachmentsDir = resolve(
resolved.root,
- resolved.attachmentsDir ?? '.vitest-attachments',
+ resolved.attachmentsDir ?? '.vitest/attachments',
)
if (resolved.snapshotEnvironment) {
diff --git a/packages/vitest/src/node/types/config.ts b/packages/vitest/src/node/types/config.ts
index f61409396..d3b87c776 100644
--- a/packages/vitest/src/node/types/config.ts
+++ b/packages/vitest/src/node/types/config.ts
@@ -860,7 +860,7 @@ export interface InlineConfig {
/**
* Directory path for storing attachments created by `context.annotate`
*
- * @default '.vitest-attachments'
+ * @default '.vitest/attachments'
*/
attachmentsDir?: string
diff --git a/test/cli/test/annotations.test.ts b/test/cli/test/annotations.test.ts
index ce0f00eb7..34103eb3d 100644
--- a/test/cli/test/annotations.test.ts
+++ b/test/cli/test/annotations.test.ts
@@ -108,8 +108,8 @@ describe('API', () => {
"[ready] simple",
"[annotate] simple 1 notice path=undefined contentType=undefined body=undefined",
"[annotate] simple 2 warning path=undefined contentType=undefined body=undefined",
- "[annotate] simple 3 notice path=/.vitest-attachments/3-.js contentType=text/javascript body=undefined",
- "[annotate] simple 4 warning path=/.vitest-attachments/4-.js contentType=text/javascript body=undefined",
+ "[annotate] simple 3 notice path=/.vitest/attachments/3-.js contentType=text/javascript body=undefined",
+ "[annotate] simple 4 warning path=/.vitest/attachments/4-.js contentType=text/javascript body=undefined",
"[annotate] simple external notice path=undefined contentType=undefined body=undefined",
"[annotate] simple with base64 body notice path=undefined contentType=undefined body=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
"[annotate] simple with Uint8Array body notice path=undefined contentType=undefined body=AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==",
@@ -177,7 +177,7 @@ describe('API', () => {
{
"attachment": {
"contentType": "text/javascript",
- "path": "/.vitest-attachments/3-.js",
+ "path": "/.vitest/attachments/3-.js",
},
"location": {
"column": 9,
@@ -190,7 +190,7 @@ describe('API', () => {
{
"attachment": {
"contentType": "text/javascript",
- "path": "/.vitest-attachments/4-.js",
+ "path": "/.vitest/attachments/4-.js",
},
"location": {
"column": 9,
diff --git a/test/cli/test/artifacts.test.ts b/test/cli/test/artifacts.test.ts
index a997f58fc..d43d0571c 100644
--- a/test/cli/test/artifacts.test.ts
+++ b/test/cli/test/artifacts.test.ts
@@ -108,10 +108,10 @@ describe('API', () => {
[
"[ready] simple",
"[artifact] simple with-no-attachments path=undefined contentType=undefined body=undefined",
- "[artifact] simple with-one-attachment path=[ '/.vitest-attachments/.js' ] contentType=[ 'text/javascript' ] body=[ undefined ]",
+ "[artifact] simple with-one-attachment path=[ '/.vitest/attachments/.js' ] contentType=[ 'text/javascript' ] body=[ undefined ]",
"[artifact] simple with-multiple-attachments path=[
- '/.vitest-attachments/.js',
- '/.vitest-attachments/.js'
+ '/.vitest/attachments/.js',
+ '/.vitest/attachments/.js'
] contentType=[ 'text/javascript', 'text/javascript' ] body=[ undefined, undefined ]",
"[artifact] simple external path=undefined contentType=undefined body=undefined",
"[artifact] simple with-base64 path=[ undefined ] contentType=[ undefined ] body=[ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' ]",
@@ -156,7 +156,7 @@ describe('API', () => {
"attachments": [
{
"contentType": "text/javascript",
- "path": "/.vitest-attachments/.js",
+ "path": "/.vitest/attachments/.js",
},
],
"location": {
@@ -170,11 +170,11 @@ describe('API', () => {
"attachments": [
{
"contentType": "text/javascript",
- "path": "/.vitest-attachments/.js",
+ "path": "/.vitest/attachments/.js",
},
{
"contentType": "text/javascript",
- "path": "/.vitest-attachments/.js",
+ "path": "/.vitest/attachments/.js",
},
],
"location": {