|
14 | 14 | "build:types": "tsc --emitDeclarationOnly", |
15 | 15 | "build": "npm run clean && npm run build:types && gulp", |
16 | 16 | "commit": "git-cz", |
17 | | - "test": "echo \"Error: no test specified\" && exit 1" |
| 17 | + "test": "jest", |
| 18 | + "test:watch": "jest --watch", |
| 19 | + "test:coverage": "jest --coverage", |
| 20 | + "test:update": "jest --updateSnapshot" |
18 | 21 | }, |
19 | 22 | "repository": { |
20 | 23 | "type": "git", |
|
47 | 50 | "@babel/preset-typescript": "^7.7.7", |
48 | 51 | "@commitlint/cli": "^8.2.0", |
49 | 52 | "@commitlint/config-conventional": "^8.2.0", |
| 53 | + "@testing-library/jest-dom": "^4.2.4", |
| 54 | + "@testing-library/react": "^9.4.0", |
| 55 | + "@types/jest": "^24.0.25", |
| 56 | + "@types/testing-library__react": "^9.1.2", |
50 | 57 | "@types/vfile-message": "^2.0.0", |
51 | 58 | "@umijs/fabric": "^1.2.12", |
52 | 59 | "antd": "^3.26.3", |
|
62 | 69 | "gulp-cssnano": "^2.1.3", |
63 | 70 | "gulp-less": "^4.0.1", |
64 | 71 | "husky": "^3.1.0", |
| 72 | + "identity-obj-proxy": "^3.0.0", |
| 73 | + "jest": "^24.9.0", |
65 | 74 | "less": "^3.10.3", |
66 | 75 | "lint-staged": "^9.5.0", |
67 | 76 | "prettier": "^1.19.1", |
|
73 | 82 | "react-simple-code-editor": "^0.10.0", |
74 | 83 | "react-use": "^13.12.2", |
75 | 84 | "rimraf": "^3.0.0", |
| 85 | + "snapshot-diff": "^0.6.1", |
76 | 86 | "through2": "^3.0.1", |
| 87 | + "ts-jest": "^24.2.0", |
77 | 88 | "typescript": "^3.7.3" |
78 | 89 | }, |
79 | 90 | "lint-staged": { |
80 | 91 | "components/**/*.ts?(x)": [ |
81 | 92 | "prettier --write", |
82 | 93 | "eslint --fix", |
| 94 | + "jest --bail --findRelatedTests", |
83 | 95 | "git add" |
84 | 96 | ], |
85 | 97 | "components/**/*.less": [ |
|
0 commit comments