Skip to content

Commit

Permalink
* Generate code coverage
Browse files Browse the repository at this point in the history
* Better unit test reporter
* Show coverage in README
  • Loading branch information
Michael Hoffmann committed Jul 26, 2018
1 parent 6b9fd82 commit e0139fd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -30,6 +30,7 @@ addons:

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install yarn; fi
- export {no_proxy,NO_PROXY}="127.0.0.1,localhost" # see https://github.com/electron/spectron/issues/144
- yarn

script:
Expand Down
5 changes: 4 additions & 1 deletion README.md
@@ -1,4 +1,5 @@
[![Travis Build Status][build-badge]][build]
[![Coverage Status][coverage-badge]][coverage]
[![Make a pull request][prs-badge]][prs]
[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)

Expand Down Expand Up @@ -77,4 +78,6 @@ Note that you can't use Electron or NodeJS native libraries in this case. Please
[build-badge]: https://travis-ci.org/Mokkapps/scrum-daily-standup-picker.svg?branch=master
[build]: https://travis-ci.org/Mokkapps/scrum-daily-standup-picker.svg?branch=master
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
[prs]: http://makeapullrequest.com
[coverage-badge]: https://coveralls.io/repos/github/Mokkapps/scrum-daily-standup-picker/badge.svg?branch=master
[coverage]: https://coveralls.io/github/Mokkapps/scrum-daily-standup-picker?branch=master
2 changes: 2 additions & 0 deletions main.js
Expand Up @@ -50,6 +50,8 @@ function createWindow() {
if (serve) {
win.webContents.openDevTools();
}
// Standup picker only works with .deb on Linux but auto-updater
// does not work for .deb and only for AppImage and Snap
if (!isDev && !isLinux) {
autoUpdater.checkForUpdates();
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -46,7 +46,7 @@
"release:mac": "npm run build:prod && npx electron-builder build --mac -p always",
"release:linux": "npm run build:prod && npx electron-builder build --linux -p always",
"release:linux:arm": "npm run build:prod && npx electron-builder build --linux --armv7l -p always",
"test": "npm run postinstall:web && ng test",
"test": "npm run postinstall:web && ng test --code-coverage",
"test:dev": "npm run postinstall:web && ng test --browsers Chrome --environment dev --watch",
"pretest:electron": "npm run clear:temp",
"test:electron": "npm run build:dev --e2e && mocha",
Expand Down Expand Up @@ -95,6 +95,7 @@
"karma-coverage-istanbul-reporter": "2.0.0",
"karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "1.1.0",
"karma-mocha-reporter": "^2.2.5",
"mocha": "^5.2.0",
"node-random-name": "^1.0.1",
"npm-run-all": "4.1.3",
Expand Down
5 changes: 3 additions & 2 deletions src/karma.conf.js
Expand Up @@ -10,7 +10,8 @@ module.exports = function(config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-mocha-reporter')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
Expand All @@ -21,7 +22,7 @@ module.exports = function(config) {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
reporters: ['mocha', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down

0 comments on commit e0139fd

Please sign in to comment.