Skip to content

Commit

Permalink
NEW: Add support to make report of the test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
lbdremy committed Aug 30, 2012
1 parent 223f019 commit 1d8c25c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
node_modules
node_modules
coverage.html
9 changes: 9 additions & 0 deletions Makefile
@@ -0,0 +1,9 @@
test:
npm test

coverage:
jscoverage lib lib-cov
CSV_STREAM_COV=1 node_modules/mocha/bin/mocha -R html-cov > coverage.html
rm -rf lib-cov

.PHONY: test
5 changes: 3 additions & 2 deletions test/parser-test.js
Expand Up @@ -4,7 +4,8 @@

var mocha = require('mocha'),
assert = require('chai').assert,
Parser = require('./../lib/parser');
libPath = process.env['CSV_STREAM_COV'] ? '../lib-cov' : '../lib';
Parser = require( libPath + '/parser');

var csvText = 'id,title,description\n'
+ '1,title1,description1\n'
Expand Down Expand Up @@ -125,7 +126,7 @@ describe('Parser',function(){
parser.parse(csvText);
parser.end();
});
it('should emit `column` events with the right data witht the specified columns',function(done){
it('should emit `column` events with the right data with the specified columns',function(done){
var parser = new Parser({ columns : ['cID','cTitle','cDescription']});
var count = 0;
parser.on('column',function(key,value){
Expand Down

0 comments on commit 1d8c25c

Please sign in to comment.