Skip to content

Commit

Permalink
Tests code coverage and code climate config v2 (#7)
Browse files Browse the repository at this point in the history
* code coverage
* code climate config v2
* const or let instead of var
* yarn.lock updated
* analysis.json updated
* code coverage test reporter id
* config added in travis.yml
  • Loading branch information
programmer4web authored and plequang committed Mar 12, 2018
1 parent b1daf68 commit d71c923
Show file tree
Hide file tree
Showing 9 changed files with 1,228 additions and 631 deletions.
51 changes: 51 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
version: "2"
checks:
argument-count:
enabled: true
config:
threshold: 4
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: true
config:
threshold: 250
method-complexity:
enabled: true
config:
threshold: 5
method-count:
enabled: true
config:
threshold: 20
method-lines:
enabled: true
config:
threshold: 30
nested-control-flow:
enabled: true
config:
threshold: 4
return-statements:
enabled: true
config:
threshold: 4
similar-code:
enabled: true
identical-code:
enabled: true

plugins:
eslint:
enabled: true
channel: "eslint-4"
config:
sanitize_batch: false
extensions:
- .js
- .html
fixme:
enabled: true
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/bower_components-1.x/*
/coverage/
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
bower_components/
bower_components-1.x/
bower-1.x.json
node_modules/
coverage/
yarn-error.log
debug.log
.eslintcache
.DS_Store
bower-1.x.json
28 changes: 18 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
language: node_js
node_js: 6
node_js: "lts/*"
dist: trusty
sudo: required
env:
global:
- CC_TEST_REPORTER_ID=a57ca5e66cf9c10852daa735ad4d4eed3dd49e61af2a44768fa73cda1736ceab
addons:
firefox: latest
apt:
sources:
- google-chrome
- google-chrome
packages:
- google-chrome-stable
- google-chrome-stable
cache:
yarn: true
directories:
- node_modules
- bower_components
- bower_components-1.x
- ".eslintcache"
- "$HOME/.cache/bower"
- node_modules
- bower_components
- bower_components-1.x
- ".eslintcache"
- "$HOME/.cache/bower"
before_script:
- yarn run lint
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- yarn run lint
script:
- xvfb-run yarn test
- xvfb-run yarn test
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
notifications:
slack:
secure: VEVQ/CF/udC/4pvKXJV68B1/BkNiFjSx5xPH1RdhpKowSusTbxDtbh7/bZu2HEOYaR5QtYZskFE84yeijz32rR8GqybNSy0iBski/7PpNIDajLDi9fHC6ijtS2jz7XWCY48BJaFb+lc9VvBiNaVmwWSvjDHUGXs+vzZg1CxbPHhK6J+JgbNl0AU6TfkVkAMPTDeZY8sKjti4FQ7qYP1Yar/bBj3Za3R1VhoKEbwN0CScN4TDr/1/pEWJYk5wM4FOLOryB3shUnAI2fQ4EgUmrSmSgEYDPlt+JDNcTG/FSe4c0PcI76bfa/PlkxrT9VG91W8f7Gaj1gKK/bPLaK1emXZX1hezn93do3ddZzxz5bGN8HHyskmxzoRTj5+POOco1xIcimU72Km/28F8DCLCjJ6X1L+k1PpDNWXZAjuKMniClsGiSBI5mstNYSxjZ6OjRHuhsuRRpmKY+0QczxpxkypHmL7MmJbU1UWCwDe5x6X+qk7UdbwC2zLGJrrJrLslfVzTSq3tMiehOLvpiCnNDMDGtew5bI0eDV894QWdoO1L66qZYhf0ZebYHOcFa+Wpq/t9J/0k8cPzn/ycBM8uoihrrxVx1scDSqpEgq/0v+Ned8VTOsL1lu9fDkQuc1RMIs77d+znHHj49Tiq/M/WT0wZthFkmYX28kdp6atJOmQ=
Loading

0 comments on commit d71c923

Please sign in to comment.