Skip to content
Permalink
Browse files

adding support for coveralls integration for mean.js to report live p…

…roject code coverage information
  • Loading branch information...
lirantal committed Aug 19, 2015
1 parent 7252032 commit 7c286b00bbdbf4a3048c3e90adfb4d4f65dd3a44
Showing with 17 additions and 5 deletions.
  1. +1 −0 README.md
  2. +11 −1 gruntfile.js
  3. +2 −1 package.json
  4. +3 −3 test.js
@@ -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.

@@ -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);

@@ -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"
}
}
@@ -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');
});

0 comments on commit 7c286b0

Please sign in to comment.
You can’t perform that action at this time.