adding support for coveralls integration for mean.js to report live project code coverage information

This commit is contained in:
Liran Tal
2015-08-19 21:49:30 +03:00
parent 7252032007
commit 7c286b00bb
4 changed files with 17 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/meanjs/mean?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/meanjs/mean.svg?branch=master)](https://travis-ci.org/meanjs/mean)
[![Dependencies Status](https://david-dm.org/meanjs/mean.svg)](https://david-dm.org/meanjs/mean)
[![Coverage Status](https://coveralls.io/repos/meanjs/mean/badge.svg?branch=master&service=github)](https://coveralls.io/github/meanjs/mean?branch=master)
MEAN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for [MongoDB](http://www.mongodb.org/), [Node.js](http://www.nodejs.org/), [Express](http://expressjs.com/), and [AngularJS](http://angularjs.org/) based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components.

View File

@@ -184,10 +184,11 @@ module.exports = function (grunt) {
coverage: true,
require: 'test.js',
coverageFolder: 'coverage',
reportFormats: ['cobertura','lcovonly'],
check: {
lines: 40,
statements: 40
}
}
}
}
},
@@ -219,6 +220,15 @@ module.exports = function (grunt) {
}
});
grunt.event.on('coverage', function(lcovFileContents, done) {
require('coveralls').handleInput(lcovFileContents, function(err) {
if (err) {
return done(err);
}
done();
});
});
// Load NPM tasks
require('load-grunt-tasks')(grunt);

View File

@@ -105,6 +105,7 @@
"load-grunt-tasks": "^3.2.0",
"run-sequence": "^1.1.1",
"should": "^7.0.1",
"supertest": "^1.0.1"
"supertest": "^1.0.1",
"coveralls": "^2.11.4"
}
}

View File

@@ -3,11 +3,11 @@
/**
* Module dependencies.
*/
var app, db, config;
var app;
var path = require('path');
var app = require(path.resolve('./config/lib/app'));
app.init(function (app, db, config) {
console.log('Initialized test automation');
app.init(function () {
console.log('Initialized test automation');
});