|
@@ -4,10 +4,11 @@
|
|
|
"scripts": {
|
|
"scripts": {
|
|
|
"start": "roadhog server",
|
|
"start": "roadhog server",
|
|
|
"build": "roadhog build",
|
|
"build": "roadhog build",
|
|
|
- "lint": "eslint --ext .js src test mock",
|
|
|
|
|
- "test": "npm run lint",
|
|
|
|
|
|
|
+ "lint": "eslint --ext .js src mock tests",
|
|
|
"precommit": "npm run lint",
|
|
"precommit": "npm run lint",
|
|
|
- "site": "roadhog-api-doc static"
|
|
|
|
|
|
|
+ "site": "roadhog-api-doc static",
|
|
|
|
|
+ "test": "jest",
|
|
|
|
|
+ "test:all": "node ./tests/run-tests.js"
|
|
|
},
|
|
},
|
|
|
"dependencies": {
|
|
"dependencies": {
|
|
|
"antd": "next",
|
|
"antd": "next",
|
|
@@ -25,11 +26,14 @@
|
|
|
},
|
|
},
|
|
|
"devDependencies": {
|
|
"devDependencies": {
|
|
|
"babel-eslint": "^7.1.1",
|
|
"babel-eslint": "^7.1.1",
|
|
|
|
|
+ "babel-jest": "^21.0.0",
|
|
|
"babel-plugin-dva-hmr": "^0.3.2",
|
|
"babel-plugin-dva-hmr": "^0.3.2",
|
|
|
"babel-plugin-import": "^1.2.1",
|
|
"babel-plugin-import": "^1.2.1",
|
|
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
|
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
|
|
"babel-plugin-transform-runtime": "^6.9.0",
|
|
"babel-plugin-transform-runtime": "^6.9.0",
|
|
|
"babel-runtime": "^6.9.2",
|
|
"babel-runtime": "^6.9.2",
|
|
|
|
|
+ "cross-port-killer": "^1.0.1",
|
|
|
|
|
+ "enzyme": "^2.9.1",
|
|
|
"eslint": "^3.0.0",
|
|
"eslint": "^3.0.0",
|
|
|
"eslint-config-airbnb": "latest",
|
|
"eslint-config-airbnb": "latest",
|
|
|
"eslint-plugin-babel": "^4.0.0",
|
|
"eslint-plugin-babel": "^4.0.0",
|
|
@@ -39,9 +43,38 @@
|
|
|
"eslint-plugin-react": "^7.0.1",
|
|
"eslint-plugin-react": "^7.0.1",
|
|
|
"gh-pages": "^1.0.0",
|
|
"gh-pages": "^1.0.0",
|
|
|
"husky": "^0.13.4",
|
|
"husky": "^0.13.4",
|
|
|
|
|
+ "jest": "^21.0.1",
|
|
|
"mockjs": "^1.0.1-beta3",
|
|
"mockjs": "^1.0.1-beta3",
|
|
|
|
|
+ "nightmare": "^2.10.0",
|
|
|
|
|
+ "react-test-renderer": "^15.6.1",
|
|
|
"redbox-react": "^1.3.2",
|
|
"redbox-react": "^1.3.2",
|
|
|
"roadhog": "^1.0.2",
|
|
"roadhog": "^1.0.2",
|
|
|
"roadhog-api-doc": "^0.1.5"
|
|
"roadhog-api-doc": "^0.1.5"
|
|
|
|
|
+ },
|
|
|
|
|
+ "babel": {
|
|
|
|
|
+ "presets": [
|
|
|
|
|
+ "es2015",
|
|
|
|
|
+ "stage-0",
|
|
|
|
|
+ "react"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "plugins": [
|
|
|
|
|
+ "transform-decorators-legacy"
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ "jest": {
|
|
|
|
|
+ "setupFiles": [
|
|
|
|
|
+ "<rootDir>/tests/setupTests.js"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "testMatch": [
|
|
|
|
|
+ "**/?(*.)(spec|test|e2e).js?(x)"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "setupTestFrameworkScriptFile": "<rootDir>/tests/jasmine.js",
|
|
|
|
|
+ "moduleFileExtensions": [
|
|
|
|
|
+ "js",
|
|
|
|
|
+ "jsx"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "moduleNameMapper": {
|
|
|
|
|
+ "\\.(css|less)$": "<rootDir>/tests/styleMock.js"
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|