Add test coverage to the webclient. Update .gitignore

This commit is contained in:
Kegan Dougal 2014-11-12 16:22:14 +00:00
parent b2596c660b
commit 3d3f692fd8
3 changed files with 18 additions and 3 deletions

3
.gitignore vendored
View file

@ -34,6 +34,7 @@ graph/*.png
graph/*.dot graph/*.dot
**/webclient/config.js **/webclient/config.js
webclient/test/environment-protractor.js **/webclient/test/coverage/
**/webclient/test/environment-protractor.js
uploads uploads

View file

@ -23,7 +23,7 @@ This serves to isolate the caller from changes to the underlying url paths, as
well as attach common params (e.g. access_token) to requests. well as attach common params (e.g. access_token) to requests.
*/ */
angular.module('matrixService', []) angular.module('matrixService', [])
.factory('matrixService', ['$http', '$q', '$rootScope', function($http, $q, $rootScope) { .factory('matrixService', ['$http', '$q', function($http, $q) {
/* /*
* Permanent storage of user information * Permanent storage of user information

View file

@ -52,18 +52,32 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser // preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: { preprocessors: {
'../login/**/*.js': 'coverage',
'../room/**/*.js': 'coverage',
'../components/**/*.js': 'coverage',
'../user/**/*.js': 'coverage',
'../home/**/*.js': 'coverage',
'../recents/**/*.js': 'coverage',
'../settings/**/*.js': 'coverage',
'../app.js': 'coverage'
}, },
// test results reporter to use // test results reporter to use
// possible values: 'dots', 'progress' // possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter // available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'junit'], reporters: ['progress', 'junit', 'coverage'],
junitReporter: { junitReporter: {
outputFile: 'test-results.xml', outputFile: 'test-results.xml',
suite: '' suite: ''
}, },
coverageReporter: {
type: 'cobertura',
dir: 'coverage/',
file: 'coverage.xml'
},
// web server port // web server port
port: 9876, port: 9876,