Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-mocha-chai-sinon

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-mocha-chai-sinon - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/capture.js

57

package.json
{
"name": "grunt-mocha-chai-sinon",
"description": "MochaJS + ChaiJS + SinonJS Test Runner",
"version": "0.0.1",
"author": "Marco Pegoraro <marco.pegoraro@gmail.com>",
"contributors": [],
"repository": {
"type": "git",
"url": "https://github.com/thepeg/grunt-mocha-chai-sinon"
},
"keywords": [
"test",
"grunt",
"mocha",
"chai",
"sinon",
"bdd"
],
"dependencies": {
"mocha": "~1.14.0",
"chai": "~1.8.1",
"sinon": "~1.7.3"
},
"devDependencies": {}
"name": "grunt-mocha-chai-sinon",
"description": "MochaJS + ChaiJS + SinonJS Test Runner",
"version": "0.0.2",
"author": {
"name": "Marco Pegoraro",
"email": "marco.pegoraro@gmail.com"
},
"contributors": [],
"repository": {
"type": "git",
"url": "https://github.com/thepeg/grunt-mocha-chai-sinon"
},
"keywords": [
"test",
"grunt",
"mocha",
"chai",
"sinon",
"bdd"
],
"dependencies": {
"mocha": "~1.14.0",
"chai": "~1.8.1",
"sinon": "~1.7.3",
"blanket": "~1.1.5"
},
"devDependencies": {},
"readme": "README.md",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/thepeg/grunt-mocha-chai-sinon/issues"
},
"_id": "grunt-mocha-chai-sinon@0.0.1",
"_from": "grunt-mocha-chai-sinon@0.0.1"
}

@@ -37,2 +37,24 @@ grunt-mocha-chai-sinon

## Test Coverage
'grunt-mocha-chai-sinon': {
build: {
src: ['./specs/**/*.spec.js'],
options: {
ui: 'bdd',
reporter: 'spec'
}
},
coverage: {
src: ['./specs/**/*.spec.js'],
options: {
ui: 'bdd',
reporter: 'html-cov',
quiet: true,
captureFile: './coverage.html'
}
}
}
[1]: http://gruntjs.com/

@@ -39,0 +61,0 @@ [2]: http://visionmedia.github.io/mocha/

@@ -7,2 +7,9 @@ /**

var capture = require('../lib/capture');
require('blanket')({
// Only files that match the pattern will be instrumented
pattern: '/src/'
});
module.exports = function(grunt) {

@@ -29,8 +36,29 @@

/*
mocha.run(function (errCount) {
done(errCount === 0);
});
*/
capture(options.captureFile, options.quiet, function(complete) {
try {
mocha.run(function(errCount) {
complete(null, errCount)
});
} catch (err) {
complete(err);
}
}, function(err, errCount) {
if (err) {
done(false);
} else {
done(errCount === 0)
}
});
});
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc