Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
adding support for coveralls integration for mean.js to report live p…
Browse files Browse the repository at this point in the history
…roject code coverage information
  • Loading branch information
lirantal committed Aug 21, 2015
1 parent 7252032 commit 7c286b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 11 additions & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ module.exports = function (grunt) {
coverage: true,
require: 'test.js',
coverageFolder: 'coverage',
reportFormats: ['cobertura','lcovonly'],
check: {
lines: 40,
statements: 40
}
}
}
}
},
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.