mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-06 12:11:02 +01:00
adding support for coveralls integration for mean.js to report live project code coverage information
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
[](https://gitter.im/meanjs/mean?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://travis-ci.org/meanjs/mean)
|
||||
[](https://david-dm.org/meanjs/mean)
|
||||
[](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.
|
||||
|
||||
|
||||
12
gruntfile.js
12
gruntfile.js
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
6
test.js
6
test.js
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user