Skip to content

Commit 44879d9

Browse files
committed
chore(jest): configuration of jest
1 parent a392a6e commit 44879d9

File tree

3 files changed

+464
-32
lines changed

3 files changed

+464
-32
lines changed

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} **/
22
module.exports = {
33
preset: 'ts-jest',
4-
testEnvironment: "node",
4+
testEnvironment: "jsdom",
55
transform: {
66
"^.+.tsx?$": ["ts-jest",{}],
77
},

package.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@
44
"main": "lib/index.js",
55
"module": "esm/index.js",
66
"typings": "esm/index.d.ts",
7-
"files": ["esm", "lib", "README.md", "LICENSE"],
8-
"keywords": ["react", "component", "components", "typescript", "frontend", "react-component", "ui", "framework"],
7+
"files": [
8+
"esm",
9+
"lib",
10+
"README.md",
11+
"LICENSE"
12+
],
13+
"keywords": [
14+
"react",
15+
"component",
16+
"components",
17+
"typescript",
18+
"frontend",
19+
"react-component",
20+
"ui",
21+
"framework"
22+
],
923
"author": "Oceanhhan",
1024
"license": "MIT",
1125
"homepage": "https://agile-design.vercel.app/",
@@ -29,6 +43,7 @@
2943
"build:types": "tsc -p tsconfig.build.json && cpr lib esm",
3044
"preview:site": "pnpm build:site && serve doc-site",
3145
"clean": "rimraf lib esm dist",
46+
"test": "jest --passWithNoTests",
3247
"build": "pnpm run clean && pnpm run build:types && gulp",
3348
"commit": "git-cz",
3449
"prepublishOnly": "pnpm run build"
@@ -86,6 +101,7 @@
86101
"gulp-less": "^5.0.0",
87102
"husky": "^9.1.6",
88103
"jest": "^29.7.0",
104+
"jest-environment-jsdom": "^29.7.0",
89105
"lint-staged": "^15.2.10",
90106
"prettier": "^3.3.3",
91107
"react": "^18.3.1",
@@ -103,5 +119,8 @@
103119
"peerDependencies": {
104120
"react": ">=16.9.0",
105121
"react-dom": ">=16.9.0"
122+
},
123+
"publishConfig": {
124+
"registry": "https://registry.npmjs.org/"
106125
}
107126
}

0 commit comments

Comments
 (0)