@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 CHANGED
@@ -1,14 +1,39 @@
1
- # `@mysetup/jest-config`
1
+ # @mysetup/jest-config
2
2
 
3
- A base [Jest](https://jestjs.io/) configuration with [ts-jest](https://kulshekhar.github.io/ts-jest/), [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/), and [Jest aXe](https://github.com/nickcolley/jest-axe).
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
- ```ts
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
@@ -5,4 +5,3 @@ export declare const logger: {
5
5
  warn: jest.Mock<any, any, any>;
6
6
  error: jest.Mock<any, any, any>;
7
7
  };
8
- //# sourceMappingURL=logger.d.ts.map
@@ -1,3 +1,2 @@
1
1
  declare const _default: {};
2
2
  export default _default;
3
- //# sourceMappingURL=styleMock.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const _default: "svg-mock";
2
2
  export default _default;
3
3
  export declare const ReactComponent = "svg-mock";
4
- //# sourceMappingURL=svgMock.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
2
2
  declare const path: any;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import "@testing-library/jest-dom";
2
2
  import "jest-canvas-mock";
3
- //# sourceMappingURL=setupTests.d.ts.map
package/package.json CHANGED
@@ -1,47 +1,59 @@
1
1
  {
2
- "name": "@mysetup/jest-config",
3
- "version": "2.0.1",
4
- "license": "MIT",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist"
8
- ],
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.js"
14
- },
15
- "./package.json": "./package.json"
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
- "scripts": {
18
- "build": "rm -rf ./dist && tsc",
19
- "clean": "rm -rf node_modules .swc dist pnpm-lock.yaml && echo \"✅ Successfully removed \""
20
- },
21
- "dependencies": {
22
- "@react-aria/utils": "^3.27.0",
23
- "@testing-library/jest-dom": "^6.6.3",
24
- "@testing-library/react": "^16.2.0",
25
- "@types/react-dom": "^18.3.1",
26
- "jest": "^29.7.0",
27
- "jest-axe": "^9.0.0",
28
- "jest-canvas-mock": "^2.5.2",
29
- "jest-environment-jsdom": "^29.7.0",
30
- "next": "^15.1.9",
31
- "ts-jest": "^29.2.5"
32
- },
33
- "devDependencies": {
34
- "@mysetup/tsconfig": "latest",
35
- "@types/jest": "^29.5.14",
36
- "@types/jest-axe": "^3.5.9",
37
- "@types/node": "^22.13.1",
38
- "react": "^18.3.1",
39
- "react-dom": "^18.3.1",
40
- "typescript": "5.5.4"
41
- },
42
- "prettier": "@mysetup/prettier-config",
43
- "engines": {
44
- "node": ">=20.15.1"
45
- },
46
- "packageManager": "pnpm@9.9.0"
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,QAAA,MAAM,IAAI,KAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../setupTests.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAGnC,OAAO,kBAAkB,CAAC"}