Skip to content

Commit

Permalink
Fixes #24960 - Adds tests coverage via coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
amirfefer authored and beav committed Nov 16, 2018
1 parent 951cae8 commit 96e2d94
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

language: node_js
node_js:
- '6.14' # previous LTS, currently in EPEL
- '8' # current LTS
- '10' # future LTS
script: ./travis_run_js_tests.sh
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "npm run format && npm run lint",
"lint": "eslint webpack/",
"lint:fix": "eslint --fix webpack/",
"lint:test": "npm run lint && npm test"
"lint:test": "npm run lint && npm test",
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
},
"repository": {
"type": "git",
Expand All @@ -33,6 +34,7 @@
"babel-preset-react": "^6.24.1",
"enzyme": "^3.4.0",
"enzyme-adapter-react-16": "^1.4.0",
"coveralls": "^3.0.0",
"enzyme-to-json": "^3.1.2",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.0.0",
Expand Down Expand Up @@ -74,6 +76,9 @@
"seamless-immutable": "^7.1.2"
},
"jest": {
"collectCoverage": true,
"collectCoverageFrom": ["webpack/**/*.js", "!webpack/**/bundle*"],
"coverageReporters": ["lcov"],
"testURL": "http://localhost/",
"setupFiles": [
"raf/polyfill",
Expand Down
3 changes: 3 additions & 0 deletions travis_run_js_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set -ev
npm run test;
npm run coveralls;

0 comments on commit 96e2d94

Please sign in to comment.