Add UI Test (#10)
* Add jest and enzyme * Add test for connected component * fix lint * update travis * Add e2e test * fix ci * Add e2e test * update travis.yml * Fix global jasmine timeout * update test scripts * fix jest glob patterns * short timeout * fix travis * uitest => unit-test * Add ls in travis.yml * use electron on travis https://github.com/segmentio/nightmare/issues/313#issuecomment-152274351 * clear travis.yml * change setup file name * ignore coverage * unit-test => unit * remove helpers/visit * update test script * clean up test scripts * ignore test case
Showing
... | ... | @@ -4,10 +4,11 @@ |
"scripts": { | ||
"start": "roadhog server", | ||
"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", | ||
"site": "roadhog-api-doc static" | ||
"site": "roadhog-api-doc static", | ||
"test": "jest", | ||
"test:all": "node ./tests/run-tests.js" | ||
}, | ||
"dependencies": { | ||
"antd": "next", | ||
... | ... | @@ -25,11 +26,14 @@ |
}, | ||
"devDependencies": { | ||
"babel-eslint": "^7.1.1", | ||
"babel-jest": "^21.0.0", | ||
"babel-plugin-dva-hmr": "^0.3.2", | ||
"babel-plugin-import": "^1.2.1", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-plugin-transform-runtime": "^6.9.0", | ||
"babel-runtime": "^6.9.2", | ||
"cross-port-killer": "^1.0.1", | ||
"enzyme": "^2.9.1", | ||
"eslint": "^3.0.0", | ||
"eslint-config-airbnb": "latest", | ||
"eslint-plugin-babel": "^4.0.0", | ||
... | ... | @@ -39,9 +43,38 @@ |
"eslint-plugin-react": "^7.0.1", | ||
"gh-pages": "^1.0.0", | ||
"husky": "^0.13.4", | ||
"jest": "^21.0.1", | ||
"mockjs": "^1.0.1-beta3", | ||
"nightmare": "^2.10.0", | ||
"react-test-renderer": "^15.6.1", | ||
"redbox-react": "^1.3.2", | ||
"roadhog": "^1.0.2", | ||
"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" | ||
} | ||
} | ||
} |
src/e2e/home.e2e.js
0 → 100644
src/e2e/login.e2e.js
0 → 100644
src/routes/Dashboard.test.js
0 → 100644
tests/jasmine.js
0 → 100644
tests/run-tests.js
0 → 100644
tests/setupTests.js
0 → 100644
tests/styleMock.js
0 → 100644
Please register or sign in to comment