Skip to content

Commit 4cce8e5

Browse files
authored
Merge pull request #53 from CreoWis/issue-40-ut-capabilities
Issue 40: Vitest added
2 parents 2ae807d + fae66e3 commit 4cce8e5

File tree

4 files changed

+2058
-1667
lines changed

4 files changed

+2058
-1667
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,31 @@ Playwright tests are located in:
155155
/__tests__/e2e/
156156
```
157157

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+
158183
<!-- Project should be public for the above command to work -->
159184

160185
## Folder Structure

0 commit comments

Comments
 (0)