Comparing version 1.0.0 to 1.0.1
10
index.js
@@ -39,3 +39,3 @@ var falafel = require('falafel'); | ||
}, {})) + ';' | ||
+ 'var __coverageWrap = function (index, value) {' | ||
+ 'var __coverageWrap = function (index) {' | ||
+ 'if (__coverage[index]) ' + outputFn | ||
@@ -45,3 +45,3 @@ + '("COVERED " + ' + sfile | ||
+ 'delete __coverage[index];' | ||
+ 'return value' | ||
+ 'return function (x) { return x }' | ||
+ '};\n' | ||
@@ -59,4 +59,4 @@ ); | ||
node.init.update( | ||
'__coverageWrap(' + index + ',' | ||
+ node.init.source() + ')' | ||
'(__coverageWrap(' + index + ')(' | ||
+ node.init.source() + '))' | ||
); | ||
@@ -70,3 +70,3 @@ } | ||
expected.push(node.range); | ||
node.update('__coverageWrap(' + index + ',' + node.source() + ')'); | ||
node.update('(__coverageWrap(' + index + ')(' + node.source() + '))'); | ||
} | ||
@@ -73,0 +73,0 @@ else if ((node.type === 'ExpressionStatement' |
{ | ||
"name": "coverify", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "code coverage browserify transform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,3 +18,4 @@ var test = require('tape'); | ||
/* | ||
test('whatever', whatever); | ||
function whatever (t) { | ||
@@ -30,3 +31,2 @@ t.plan(1); | ||
} | ||
*/ | ||
@@ -33,0 +33,0 @@ function forEach (xs, f) { |
@@ -29,7 +29,13 @@ var test = require('tape'); | ||
/* | ||
test('throws', function (t) { | ||
test('throws expression', function (t) { | ||
t.plan(1); | ||
t.throws(function () { | ||
undefined.blah; | ||
}); | ||
}); | ||
test('throws function', function (t) { | ||
t.plan(1); | ||
t.throws(function () { | ||
(function () { | ||
1 + 2; | ||
return undefined; | ||
@@ -39,3 +45,2 @@ })().blah | ||
}); | ||
*/ | ||
@@ -42,0 +47,0 @@ function forEach (xs, f) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22116
419