|
28 | 28 | "precommit": "lint-staged", |
29 | 29 | "dev": "concurrently 'tsc --noEmit --watch' 'yarn build:cjs --watch' 'yarn build:es --watch' 'yarn build:umd --watch' 'yarn build:umd.min --watch'", |
30 | 30 | "prepublishOnly": "unset npm_config_cafile && yarn build", |
| 31 | + "test": "jest", |
31 | 32 | "typecheck": "tsc --noEmit" |
32 | 33 | }, |
33 | 34 | "dependencies": { |
|
39 | 40 | "@babel/plugin-external-helpers": "7.0.0-beta.54", |
40 | 41 | "@babel/preset-env": "7.0.0-beta.54", |
41 | 42 | "@babel/preset-typescript": "7.0.0-beta.54", |
| 43 | + "@types/jest": "23.3.0", |
42 | 44 | "babel-eslint": "8.2.6", |
43 | 45 | "babel-plugin-add-module-exports": "0.2.1", |
44 | 46 | "babel-plugin-dev-expression": "0.2.1", |
|
48 | 50 | "eslint-plugin-import": "2.13.0", |
49 | 51 | "eslint-plugin-react": "7.10.0", |
50 | 52 | "husky": "0.14.3", |
| 53 | + "jest": "23.4.1", |
| 54 | + "jest-junit": "5.1.0", |
51 | 55 | "lint-staged": "7.2.0", |
52 | 56 | "prettier": "1.13.7", |
53 | 57 | "prettier-package-json": "1.6.0", |
|
59 | 63 | "rollup-plugin-replace": "2.0.0", |
60 | 64 | "rollup-plugin-terser": "1.0.1", |
61 | 65 | "semantic-release": "15.8.0", |
| 66 | + "ts-jest": "23.0.1", |
62 | 67 | "typescript": "2.9.2" |
63 | 68 | }, |
64 | 69 | "keywords": [ |
|
87 | 92 | "compression": "none" |
88 | 93 | } |
89 | 94 | ], |
| 95 | + "jest": { |
| 96 | + "transform": { |
| 97 | + "^.+\\.ts$": "ts-jest" |
| 98 | + }, |
| 99 | + "testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(js|ts)$", |
| 100 | + "moduleFileExtensions": [ |
| 101 | + "ts", |
| 102 | + "tsx", |
| 103 | + "js", |
| 104 | + "jsx", |
| 105 | + "json", |
| 106 | + "node" |
| 107 | + ], |
| 108 | + "reporters": [ |
| 109 | + "default", |
| 110 | + [ |
| 111 | + "jest-junit", |
| 112 | + { |
| 113 | + "output": "reports/jest/results.xml" |
| 114 | + } |
| 115 | + ] |
| 116 | + ] |
| 117 | + }, |
90 | 118 | "lint-staged": { |
91 | 119 | "*.js": [ |
92 | 120 | "prettier --write", |
|
0 commit comments