Commit 02fb2baf by Torkel Ödegaard

Added code coverage, and sending reports to coveralls

parent 23c9f973
node_modules
coverage/
.aws-config.json
dist
......
......@@ -2,4 +2,6 @@ language: node_js
node_js:
- "0.10"
before_script:
- npm install -g grunt-cli
\ No newline at end of file
- npm install -g grunt-cli
after_script:
- npm run coveralls
......@@ -36,6 +36,8 @@
"karma": "~0.12.16",
"karma-chrome-launcher": "~0.1.4",
"karma-coffee-preprocessor": "~0.1.2",
"karma-coverage": "^0.2.5",
"karma-coveralls": "^0.1.4",
"karma-expect": "~1.1.0",
"karma-firefox-launcher": "~0.1.3",
"karma-html2js-preprocessor": "~0.1.0",
......@@ -54,7 +56,8 @@
"npm": "1.2.x"
},
"scripts": {
"test": "grunt test"
"test": "grunt test",
"coveralls": "grunt karma:coveralls && rm -rf ./coverage"
},
"license": "Apache License",
"dependencies": {
......
......@@ -2,17 +2,17 @@ module.exports = function(config) {
'use strict';
config.set({
basePath: '../',
basePath: '../../',
frameworks: ['mocha', 'requirejs', 'expect', 'sinon'],
// list of files / patterns to load in the browser
files: [
'test/test-main.js',
{pattern: 'app/**/*.js', included: false},
{pattern: 'vendor/**/*.js', included: false},
{pattern: 'test/**/*.js', included: false},
{pattern: '**/*.js', included: false}
'src/test/test-main.js',
{pattern: 'src/app/**/*.js', included: false},
{pattern: 'src/vendor/**/*.js', included: false},
{pattern: 'src/test/**/*.js', included: false},
{pattern: 'src/**/*.js', included: false}
],
// list of files to exclude
......@@ -23,8 +23,9 @@ module.exports = function(config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['PhantomJS'],
captureTimeout: 60000,
singleRun: false,
singleRun: true,
});
};
require.config({
baseUrl: 'http://localhost:9876/base/app',
baseUrl: 'http://localhost:9876/base/src/app',
paths: {
specs: '../test/specs',
......
......@@ -3,7 +3,6 @@ module.exports = function(config) {
dev: {
configFile: 'src/test/karma.conf.js',
singleRun: false,
browsers: ['PhantomJS']
},
debug: {
configFile: 'src/test/karma.conf.js',
......@@ -12,8 +11,17 @@ module.exports = function(config) {
},
test: {
configFile: 'src/test/karma.conf.js',
singleRun: true,
browsers: ['PhantomJS']
},
coveralls: {
configFile: 'src/test/karma.conf.js',
reporters: ['dots','coverage','coveralls'],
preprocessors: {
'src/app/**/*.js': ['coverage']
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
}
}
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment