@zilero/vitest 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/index.d.ts +5 -0
- package/index.js +3 -0
- package/package.json +66 -0
- package/vite.config.js +6 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Aleksandr
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# ⚡️ @zilero/vitest
|
2
|
+
|
3
|
+
<p align="center">
|
4
|
+
<a href="https://github.com/Zilero232/dev-config-hub">
|
5
|
+
<img src="https://img.shields.io/github/actions/workflow/status/Zilero232/dev-config-hub/integrate.yaml?label=CI&logo=GitHub" alt="CI status">
|
6
|
+
</a>
|
7
|
+
<a href="https://www.npmjs.com/package/@zilero/vitest">
|
8
|
+
<img src="https://img.shields.io/npm/dm/@zilero/vitest?logo=NPM" alt="npm downloads">
|
9
|
+
</a>
|
10
|
+
<a href="https://github.com/Zilero232/cli">
|
11
|
+
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="npm license">
|
12
|
+
</a>
|
13
|
+
<a href="https://github.com/Zilero232/dev-config-hub">
|
14
|
+
<img src="https://img.shields.io/npm/v/@zilero/vitest?label=version" alt="version">
|
15
|
+
</a>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
> ✨ Opinionated Vitest configuration for modern testing
|
19
|
+
|
20
|
+
## ✨ Features
|
21
|
+
|
22
|
+
- 📦 Zero-config setup
|
23
|
+
- ⚡️ Lightning fast execution
|
24
|
+
- 🎯 React Testing Library integration
|
25
|
+
- 🔧 TypeScript support out of the box
|
26
|
+
- 🚀 Next.js compatible
|
27
|
+
- 💪 Code coverage reporting
|
28
|
+
- 🎭 UI mode for test debugging
|
29
|
+
- 📊 JUnit reports for CI/CD
|
30
|
+
|
31
|
+
## 📥 Installation
|
32
|
+
|
33
|
+
### Using npm
|
34
|
+
|
35
|
+
```bash
|
36
|
+
npm install --save-dev @zilero/vitest
|
37
|
+
```
|
38
|
+
### Using yarn
|
39
|
+
|
40
|
+
```bash
|
41
|
+
yarn add -D @zilero/vitest
|
42
|
+
```
|
43
|
+
|
44
|
+
### Using pnpm
|
45
|
+
|
46
|
+
```bash
|
47
|
+
pnpm install -D @zilero/vitest
|
48
|
+
```
|
49
|
+
|
50
|
+
## 🚀 Quick start
|
51
|
+
|
52
|
+
Create the `vite.config.js` at the root of your project:
|
53
|
+
|
54
|
+
```javascript
|
55
|
+
import { vitest } from '@zilero/vitest';
|
56
|
+
|
57
|
+
module.exports = vitest;
|
58
|
+
```
|
59
|
+
|
60
|
+
Add scripts to your `package.json`:
|
61
|
+
|
62
|
+
```json
|
63
|
+
"scripts": {
|
64
|
+
"test": "vitest",
|
65
|
+
"test:ui": "vitest --ui",
|
66
|
+
"test:coverage": "vitest run --coverage",
|
67
|
+
"test:ci": "vitest run --coverage --reporter=json --reporter=junit"
|
68
|
+
}
|
69
|
+
```
|
70
|
+
|
71
|
+
## 🤝 Contributing
|
72
|
+
|
73
|
+
We'd love for you to contribute to `@zilero/vitest`! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is always appreciated.
|
74
|
+
|
75
|
+
### How to contribute:
|
76
|
+
|
77
|
+
1. Fork the repository.
|
78
|
+
2. Create a new branch (`git checkout -b feature/your-feature`).
|
79
|
+
3. Make your changes.
|
80
|
+
4. Commit your changes (`git commit -am 'Add new feature'`).
|
81
|
+
5. Push to the branch (`git push origin feature/your-feature`).
|
82
|
+
6. Open a pull request.
|
83
|
+
|
84
|
+
## 📜 Code of Conduct
|
85
|
+
|
86
|
+
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md) when participating in this project to ensure a welcoming and productive atmosphere.
|
87
|
+
|
88
|
+
## 🔒 Security Policy
|
89
|
+
|
90
|
+
Security is our priority. If you encounter any issues, please read our full [Security Policy](SECURITY.md) to report vulnerabilities safely and responsibly.
|
91
|
+
|
92
|
+
## 👥 Team
|
93
|
+
|
94
|
+
These folks keep the project moving and are resources for help.
|
95
|
+
|
96
|
+
<table>
|
97
|
+
<tbody>
|
98
|
+
<tr>
|
99
|
+
<td align="center" valign="top" width="11%">
|
100
|
+
<a href="https://career.habr.com/zilero">
|
101
|
+
<img src="https://avatars.githubusercontent.com/u/68345676?s=400&u=eb7df22c29a8aca48def78ec54a7526601c9fd8f&v=4" width="100" height="100" alt="Artemev Alexandr - Avatar">
|
102
|
+
<br />
|
103
|
+
Artemev A. A.
|
104
|
+
</a>
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
</tbody>
|
108
|
+
</table>
|
109
|
+
|
110
|
+
## 📄 License
|
111
|
+
|
112
|
+
License `@zilero/vitest` is licensed under the [MIT License](LICENSE).
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"name": "@zilero/vitest",
|
3
|
+
"icon": "⚡️",
|
4
|
+
"displayName": "✨ Zilero Vitest Config",
|
5
|
+
"description": "⚡️ Opinionated Vitest configuration for modern testing",
|
6
|
+
"license": "MIT",
|
7
|
+
"version": "1.0.0",
|
8
|
+
"author": {
|
9
|
+
"name": "Artemev Alexandr",
|
10
|
+
"url": "https://github.com/Zilero232",
|
11
|
+
"email": "sasha.artemev.1002@mail.ru"
|
12
|
+
},
|
13
|
+
"keywords": [
|
14
|
+
"vitest",
|
15
|
+
"vite",
|
16
|
+
"testing",
|
17
|
+
"test",
|
18
|
+
"typescript",
|
19
|
+
"react",
|
20
|
+
"vue",
|
21
|
+
"jest",
|
22
|
+
"unit-testing",
|
23
|
+
"config"
|
24
|
+
],
|
25
|
+
"engines": {
|
26
|
+
"node": ">=18.0.0",
|
27
|
+
"npm": ">=8.0.0"
|
28
|
+
},
|
29
|
+
"bugs": {
|
30
|
+
"url": "https://github.com/Zilero232/dev-config-hub/issues"
|
31
|
+
},
|
32
|
+
"homepage": "https://github.com/Zilero232/dev-config-hub",
|
33
|
+
"repository": {
|
34
|
+
"url": "https://github.com/Zilero232/dev-config-hub"
|
35
|
+
},
|
36
|
+
"publishConfig": {
|
37
|
+
"access": "public"
|
38
|
+
},
|
39
|
+
"files": [
|
40
|
+
"vite.config.js",
|
41
|
+
"index.d.ts",
|
42
|
+
"index.js"
|
43
|
+
],
|
44
|
+
"main": "index.js",
|
45
|
+
"types": "index.d.ts",
|
46
|
+
"categories": [
|
47
|
+
"Testing"
|
48
|
+
],
|
49
|
+
"peerDependencies": {
|
50
|
+
"vitest": "^1.6.0",
|
51
|
+
"jsdom": "^24.1.0"
|
52
|
+
},
|
53
|
+
"dependencies": {
|
54
|
+
"vitest": "^1.6.0",
|
55
|
+
"jsdom": "^24.1.0"
|
56
|
+
},
|
57
|
+
"scripts": {
|
58
|
+
"test": "vitest",
|
59
|
+
"test:ui": "vitest --ui",
|
60
|
+
"test:run": "vitest run",
|
61
|
+
"test:watch": "vitest watch",
|
62
|
+
"test:coverage": "vitest run --coverage",
|
63
|
+
"test:ci": "vitest run --coverage --reporter=json --reporter=junit",
|
64
|
+
"test:update": "vitest -u"
|
65
|
+
}
|
66
|
+
}
|