Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Sep 25, 2014
1 parent e470797 commit 4d59d9c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '0.10'
- '0.11'
script: make test
- "0.10"
- "0.11"
script: "make test-travis"
after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls"
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ test-cov:
$(MOCHA_OPTS) \
$(TESTS)

test-travis:
@NODE_ENV=test node \
node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
$(MOCHA_OPTS) \
$(TESTS)

autod:
@./node_modules/.bin/autod -w -e example.js --prefix=~
@$(MAKE) install
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
mini-logger
------------

[![travis-ci](https://travis-ci.org/node-modules/mini-logger.svg?branch=master)](https://travis-ci.org/node-modules/mini-logger)
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Coveralls][coveralls-image]][coveralls-url]
[![David deps][david-image]][david-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[![Gittip][gittip-image]][gittip-url]

[npm-image]: https://img.shields.io/npm/v/mini-logger.svg?style=flat-square
[npm-url]: https://npmjs.org/package/mini-logger
[travis-image]: https://img.shields.io/travis/node-modules/mini-logger.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/mini-logger
[coveralls-image]: https://img.shields.io/coveralls/node-modules/mini-logger.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/node-modules/mini-logger?branch=master
[david-image]: https://img.shields.io/david/node-modules/mini-logger.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/mini-logger
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/mini-logger.svg?style=flat-square
[download-url]: https://npmjs.org/package/mini-logger
[gittip-image]: https://img.shields.io/gittip/dead-horse.svg?style=flat-square
[gittip-url]: https://www.gittip.com/dead-horse/

A really simple logger for web server or others.

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Logger.prototype._write = function (category, msg) {
// write to file
if (this._options.file && this._streams[category]) this._streams[category].write(msg);

/* istanbul ignore next */
// write to stdout
if (this._options.stdout) {
msg = '[' + category + '] ' + msg;
Expand Down

0 comments on commit 4d59d9c

Please sign in to comment.