File tree Expand file tree Collapse file tree 4 files changed +2058
-1667
lines changed Expand file tree Collapse file tree 4 files changed +2058
-1667
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,31 @@ Playwright tests are located in:
155
155
/__tests__/e2e/
156
156
```
157
157
158
+ ## Vitest Unit & Integration Testing
159
+
160
+ NextJsLaunchpad includes Vitest for fast and efficient unit and integration testing. This setup provides:
161
+
162
+ - ** Lightning-Fast Execution** : Runs tests in parallel for speed.
163
+ - ** JSDOM Environment** : Simulates a browser-like environment for React components.
164
+ - ** TypeScript Support** : Fully compatible with TypeScript for better type safety.
165
+ - ** Mocking & Snapshot Testing** : Supports mocking API calls and UI snapshots.
166
+
167
+ ### Running Vitest Tests
168
+
169
+ To execute Vitest tests, use:
170
+
171
+ ``` shell
172
+ npm run vitest
173
+ ```
174
+
175
+ ### Vitest Configuration
176
+
177
+ Test settings are defined in:
178
+
179
+ ``` plaintext
180
+ /vitest.config.mts
181
+ ```
182
+
158
183
<!-- Project should be public for the above command to work -->
159
184
160
185
## Folder Structure
You can’t perform that action at this time.
0 commit comments