Skip to content

Commit

Permalink
Add test coverage threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Jun 7, 2018
1 parent 801bdae commit f217e2b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bower_components
node_modules
package-lock.json
coverage
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ script:
wct --env saucelabs-cron;
fi;
fi

after_success:
- "cat ${TRAVIS_BUILD_DIR}/coverage/lcov.info | coveralls"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![npm version](https://badge.fury.io/js/%40vaadin%2Fvaadin-text-field.svg)](https://badge.fury.io/js/%40vaadin%2Fvaadin-text-field)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-text-field)
[![Build Status](https://travis-ci.org/vaadin/vaadin-text-field.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-text-field)
[![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-text-field/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-text-field?branch=master)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-text-field)
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"devDependencies": {
"bower": "latest",
"coveralls": "^3.0.1",
"eslint": "^4.0.0",
"eslint-config-vaadin": "latest",
"eslint-plugin-html": "^4.0.0",
Expand All @@ -39,6 +40,7 @@
"polymer-cli": "^1.6.0",
"stylelint": "^9.0.0",
"stylelint-config-vaadin": "latest",
"wct-istanbul": "^0.14.3",
"web-component-tester": "^6.1.5",
"yargs": "^8.0.0"
}
Expand Down
16 changes: 16 additions & 0 deletions wct.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
var argv = require('yargs').argv;

module.exports = {
plugins: {
'istanbul': {
dir: './coverage',
reporters: ['text-summary', 'lcov'],
include: [
'**/vaadin-text-field/src/*.html'
],
exclude: [],
thresholds: {
global: {
statements: 87
}
}
}
},

registerHooks: function(context) {
var saucelabsPlatforms = [
'macOS 10.12/iphone@10.3',
Expand Down

0 comments on commit f217e2b

Please sign in to comment.