@nuxt/docs-nightly 4.5.2-29765770.c8af8ed3 → 4.5.3-29774178.763f6576
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'test'
|
|
3
|
+
head.title: 'test/'
|
|
4
|
+
description: 'Use the test/ directory to organize unit, Nuxt, and end-to-end tests for your application.'
|
|
5
|
+
navigation.icon: i-vscode-icons-folder-type-test
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The `test/` directory is the recommended place for your application tests. Nuxt does not scan it the way it does `app/` or `server/`; you choose the runner and layout yourself (typically with [`@nuxt/test-utils`](/docs/4.x/getting-started/testing)).
|
|
9
|
+
|
|
10
|
+
A common layout separates environments:
|
|
11
|
+
|
|
12
|
+
```bash [Directory structure]
|
|
13
|
+
-| test/
|
|
14
|
+
---| e2e/
|
|
15
|
+
---| nuxt/
|
|
16
|
+
---| unit/
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- `test/unit/` — fast Node tests without the Nuxt runtime
|
|
20
|
+
- `test/nuxt/` — tests that need the Nuxt runtime environment
|
|
21
|
+
- `test/e2e/` — end-to-end tests against a running app
|
|
22
|
+
|
|
23
|
+
::read-more{to="/docs/4.x/getting-started/testing#organizing-your-tests"}
|
|
24
|
+
See **Organizing Your Tests** for setup, Vitest projects, and TypeScript context.
|
|
25
|
+
::
|
|
@@ -46,6 +46,10 @@ The [`server/`](/docs/4.x/directory-structure/server) directory is the directory
|
|
|
46
46
|
|
|
47
47
|
The [`shared/`](/docs/4.x/directory-structure/shared) directory is the directory that contains the shared code of the Nuxt application and Nuxt server. This code can be used in both the Vue app and the Nitro server.
|
|
48
48
|
|
|
49
|
+
## Test Directory
|
|
50
|
+
|
|
51
|
+
The [`test/`](/docs/4.x/directory-structure/test) directory is the recommended place for application tests (unit, Nuxt runtime, and end-to-end). See [Organizing Your Tests](/docs/4.x/getting-started/testing#organizing-your-tests) for layout and setup details.
|
|
52
|
+
|
|
49
53
|
## Content Directory
|
|
50
54
|
|
|
51
55
|
The [`content/`](/docs/4.x/directory-structure/content) directory is enabled by the [Nuxt Content](https://content.nuxt.com) module. It is used to create a file-based CMS for your application using Markdown files.
|