@aristobyte-ui/jest-config 2.3.6 → 2.4.0
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.
- package/package.json +1 -1
- package/README.md +0 -111
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/jest-config",
|
|
3
3
|
"description": "Centralized, shareable Jest configuration presets for AristoByteUI monorepo projects. Supports Node, React, and Next.js environments with TypeScript, Babel integration, and consistent coverage reporting.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./jest.base.js",
|
package/README.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# `@aristobyte-ui/jest-config`
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="https://img.shields.io/badge/TypeScript-5.8-blue?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
|
|
5
|
-
<img src="https://img.shields.io/badge/Jest-29-red?style=for-the-badge&logo=jest&logoColor=white" alt="Jest" />
|
|
6
|
-
<img src="https://img.shields.io/badge/Testing-Library-blueviolet?style=for-the-badge&logo=testinglibrary&logoColor=white" alt="Testing Library" />
|
|
7
|
-
<img src="https://img.shields.io/badge/React-Supported-61DAFB?style=for-the-badge&logo=react&logoColor=white" alt="React Support" />
|
|
8
|
-
<img src="https://img.shields.io/badge/Next.js-Supported-000000?style=for-the-badge&logo=nextdotjs&logoColor=white" alt="Next.js Support" />
|
|
9
|
-
<img src="https://img.shields.io/badge/Node-20.17.0+-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js >=20.17.0" />
|
|
10
|
-
<img src="https://img.shields.io/badge/Yarn-1.22+-2C8EBB?style=for-the-badge&logo=yarn&logoColor=white" alt="Yarn >=1.22" />
|
|
11
|
-
<img src="https://img.shields.io/badge/NPM-10.8+-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="NPM >=10.8" />
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
Centralized, shareable **Jest configuration presets** for AristoByteUI monorepo projects, supporting Node, React, and Next.js environments.
|
|
15
|
-
|
|
16
|
-
## 📦 Installation
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Install via Yarn
|
|
20
|
-
yarn add -D @aristobyte-ui/jest-config
|
|
21
|
-
|
|
22
|
-
# Or via npm
|
|
23
|
-
npm install -D @aristobyte-ui/jest-config
|
|
24
|
-
|
|
25
|
-
# Or via pnpm
|
|
26
|
-
pnpm add -D @aristobyte-ui/jest-config
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 🛠 Usage
|
|
30
|
-
|
|
31
|
-
**Base config (Node environment):**
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
import { config } from '@aristobyte-ui/jest-config/base';
|
|
35
|
-
export default config;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**React config (includes Testing Library):**
|
|
39
|
-
|
|
40
|
-
```ts
|
|
41
|
-
import { config } from '@aristobyte-ui/jest-config/react';
|
|
42
|
-
export default config;
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Next.js config (includes React + moduleNameMapper for CSS/Assets):**
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
import { config } from '@aristobyte-ui/jest-config/next';
|
|
49
|
-
export default config;
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## 📂 Presets Available
|
|
53
|
-
|
|
54
|
-
- `base` → Node-first Jest configuration with TypeScript & Babel integration.
|
|
55
|
-
- `react` → Extends `base` with jsdom environment and Testing Library setup.
|
|
56
|
-
- `next` → Extends react with moduleNameMapper and CSS/asset mocking for Next.js.
|
|
57
|
-
|
|
58
|
-
## 🔧 Example in a Package
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"name": "@aristobyte-ui/button",
|
|
63
|
-
"version": "1.0.0",
|
|
64
|
-
"scripts": {
|
|
65
|
-
"test": "jest --config jest.config.js"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
|
-
"@aristobyte-ui/jest-config": "2.0.0",
|
|
69
|
-
"jest": "^29.0.0",
|
|
70
|
-
"@testing-library/jest-dom": "^6.0.0"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
And `jest.config.js`:
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
import { config } from '@aristobyte-ui/jest-config/react';
|
|
79
|
-
export default config;
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## 📊 Why This Matters
|
|
83
|
-
|
|
84
|
-
| Feature | Benefit |
|
|
85
|
-
| ---------------------- | -------------------------------------------------- |
|
|
86
|
-
| Base config | Node-first, TypeScript-ready testing |
|
|
87
|
-
| React support | jsdom environment + Testing Library integration |
|
|
88
|
-
| Next.js support | Module mapping for CSS/Assets + React integration |
|
|
89
|
-
| Coverage config | Centralized coverage reporting and ignore patterns |
|
|
90
|
-
| Monorepo-ready | Consistent Jest behavior across packages |
|
|
91
|
-
| Babel & TS integration | Compile TS & modern JS seamlessly |
|
|
92
|
-
|
|
93
|
-
## 🏆 Philosophy
|
|
94
|
-
|
|
95
|
-
At **AristoByte**, testing is **foundational** for reliability and team scalability.
|
|
96
|
-
These configs empower developers to **write consistent, predictable, and maintainable tests** across the monorepo.
|
|
97
|
-
|
|
98
|
-
## 📜 License
|
|
99
|
-
|
|
100
|
-
[MIT](./LICENSE) © AristoByte
|
|
101
|
-
|
|
102
|
-
## 🛡 Shields Showcase
|
|
103
|
-
|
|
104
|
-
<p align="center">
|
|
105
|
-
<img src="https://img.shields.io/badge/Consistency-100%25-green?style=for-the-badge&logo=jest" />
|
|
106
|
-
<img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge&logo=github" />
|
|
107
|
-
<img src="https://img.shields.io/badge/React-Tested-61DAFB?style=for-the-badge&logo=react" />
|
|
108
|
-
<img src="https://img.shields.io/badge/Next.js-Supported-black?style=for-the-badge&logo=nextdotjs" />
|
|
109
|
-
<img src="https://img.shields.io/badge/Babel-Integrated-F9DC3E?style=for-the-badge&logo=babel&logoColor=black" />
|
|
110
|
-
<img src="https://img.shields.io/badge/TypeScript-Enabled-3178C6?style=for-the-badge&logo=typescript" />
|
|
111
|
-
</p>
|