@mysetup/jest-config 2.0.1 → 2.0.4
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/README.md +29 -4
- package/dist/__mocks__/logger.d.ts +0 -1
- package/dist/__mocks__/styleMock.d.ts +0 -1
- package/dist/__mocks__/svgMock.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/setupTests.d.ts +0 -1
- package/package.json +57 -45
- package/dist/__mocks__/logger.d.ts.map +0 -1
- package/dist/__mocks__/styleMock.d.ts.map +0 -1
- package/dist/__mocks__/svgMock.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/setupTests.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mysetup/jest-config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Base Jest configuration with `ts-jest`, Testing Library setup, and project defaults for React/Next.js packages.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add -D @mysetup/jest-config jest
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Supported libraries and runtimes
|
|
14
|
+
|
|
15
|
+
| Supported | Notes |
|
|
16
|
+
| --------------------- | ---------------------------- |
|
|
17
|
+
| Jest | Required |
|
|
18
|
+
| React Testing Library | Supported |
|
|
19
|
+
| Next.js test setup | Supported |
|
|
20
|
+
| Vitest | Not targeted by this package |
|
|
4
21
|
|
|
5
22
|
## Usage
|
|
6
23
|
|
|
7
|
-
```
|
|
24
|
+
```js
|
|
8
25
|
const jestConfig = require("@mysetup/jest-config");
|
|
9
26
|
|
|
10
27
|
module.exports = {
|
|
11
28
|
...jestConfig,
|
|
12
|
-
// Additional configuration
|
|
13
29
|
};
|
|
14
30
|
```
|
|
31
|
+
|
|
32
|
+
## Scripts
|
|
33
|
+
|
|
34
|
+
- `pnpm build` - compile TypeScript to `dist/`
|
|
35
|
+
- `pnpm clean` - remove generated artifacts
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
MIT
|
package/dist/index.d.ts
CHANGED
package/dist/setupTests.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,47 +1,59 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "@mysetup/jest-config",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Shared Jest configuration and test utilities for React and Next.js projects.",
|
|
5
|
+
"author": "krishnaraj <krishnaraj.webdev@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"jest",
|
|
9
|
+
"testing",
|
|
10
|
+
"react",
|
|
11
|
+
"nextjs",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"require": "./dist/index.js"
|
|
16
26
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@react-aria/utils": "^3.27.0",
|
|
31
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
32
|
+
"@testing-library/react": "^16.2.0",
|
|
33
|
+
"@types/react-dom": "^18.3.1",
|
|
34
|
+
"jest": "^29.7.0",
|
|
35
|
+
"jest-axe": "^9.0.0",
|
|
36
|
+
"jest-canvas-mock": "^2.5.2",
|
|
37
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
38
|
+
"next": "^15.1.9",
|
|
39
|
+
"ts-jest": "^29.2.5"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/jest": "^29.5.14",
|
|
43
|
+
"@types/jest-axe": "^3.5.9",
|
|
44
|
+
"@types/node": "^22.13.1",
|
|
45
|
+
"react": "^18.3.1",
|
|
46
|
+
"react-dom": "^18.3.1",
|
|
47
|
+
"typescript": "5.5.4",
|
|
48
|
+
"@mysetup/tsconfig": "^2.0.4"
|
|
49
|
+
},
|
|
50
|
+
"prettier": "@mysetup/prettier-config",
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=20.15.1"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"checks": "pnpm build",
|
|
56
|
+
"build": "node ../scripts/package-fs.cjs remove dist && tsc",
|
|
57
|
+
"clean": "node ../scripts/package-fs.cjs remove node_modules .swc dist pnpm-lock.yaml && echo \"Cleaned\""
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../__mocks__/logger.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styleMock.d.ts","sourceRoot":"","sources":["../../__mocks__/styleMock.ts"],"names":[],"mappings":";AAAA,wBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"svgMock.d.ts","sourceRoot":"","sources":["../../__mocks__/svgMock.ts"],"names":[],"mappings":";AAAA,wBAA0B;AAC1B,eAAO,MAAM,cAAc,aAAa,CAAC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,QAAA,MAAM,IAAI,KAAuB,CAAC"}
|
package/dist/setupTests.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../setupTests.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAGnC,OAAO,kBAAkB,CAAC"}
|