New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coveralls

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coveralls - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

22

lib/logger.js
module.exports = function(){
if (process.argv[2]) {
if (~['-v', '--verbose'].indexOf(process.argv[2])) {
return require('log-driver')({level : 'debug'});
}
return require('log-driver')({level : getLogLevel()});
};
function getLogLevel(){
if (hasVerboseCommandLineOption() || hasDebugEnvVariable()) {
return 'debug';
}
return require('log-driver')({level : 'warn'});
};
return 'warn';
}
function hasVerboseCommandLineOption(){
return process.argv[2] && ~['-v', '--verbose'].indexOf(process.argv[2]);
}
function hasDebugEnvVariable(){
return process.env.NODE_COVERALLS_DEBUG == 1;
}

@@ -8,3 +8,3 @@ {

],
"version": "2.5.0",
"version": "2.6.0",
"bugs": {

@@ -11,0 +11,0 @@ "url": "https://github.com/cainus/node-coveralls/issues"

@@ -89,2 +89,12 @@ #node-coveralls

### [Poncho](https://github.com/deepsweet/poncho)
Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomjs), [Mocha](https://github.com/visionmedia/mocha) and [Blanket](https://github.com/alex-seville/blanket):
- [Configure](http://visionmedia.github.io/mocha/#browser-support) Mocha for browser
- [Mark](https://github.com/deepsweet/poncho#usage) target script(s) with `data-cover` html-attribute
- Run your tests with a command like this:
```sh
./node_modules/.bin/poncho -R lcov test/test.html | ./node_modules/coveralls/bin/coveralls.js
```
## Running locally

@@ -91,0 +101,0 @@

@@ -11,2 +11,23 @@ var should = require('should');

});
it ("should log at debug level when NODE_COVERALLS_DEBUG is set in env", function(){
process.argv = [];
process.env.NODE_COVERALLS_DEBUG = 1;
var logger = require('../index').logger();
logger.level.should.equal('debug');
});
it ("should log at debug level when NODE_COVERALLS_DEBUG is set in env as a string", function(){
process.argv = [];
process.env.NODE_COVERALLS_DEBUG = '1';
var logger = require('../index').logger();
logger.level.should.equal('debug');
});
it ("should log at warn level when NODE_COVERALLS_DEBUG not set and no --verbose", function(){
process.argv = [];
process.env.NODE_COVERALLS_DEBUG = 0;
var logger = require('../index').logger();
logger.level.should.equal('warn');
});
});
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