Comparing version 0.1.41 to 0.1.42
@@ -5,2 +5,3 @@ Changelog | ||
<table> | ||
<tr><td>v0.1.42</td><td>fix #78: embed source regression introduced in v0.1.38. Fix broken test for this</td></tr> | ||
<tr><td>v0.1.41</td><td>add json report to dump coverage object for certain use cases</td></tr> | ||
@@ -7,0 +8,0 @@ <tr><td>v0.1.40</td><td>forward sourceStore from lcov to html report, pull request by @vojtajina</td></tr> |
@@ -374,3 +374,3 @@ /* | ||
} | ||
return this.instrumentASTSync(program, filename); | ||
return this.instrumentASTSync(program, filename, code); | ||
}, | ||
@@ -385,4 +385,6 @@ /** | ||
* of this library. | ||
* @param {String} originalCode the original code corresponding to the AST, | ||
* used for embedding the source into the coverage object | ||
*/ | ||
instrumentASTSync: function (program, filename) { | ||
instrumentASTSync: function (program, filename, originalCode) { | ||
filename = filename || String(new Date().getTime()) + '.js'; | ||
@@ -408,3 +410,3 @@ this.coverState = { | ||
//console.log(JSON.stringify(program, undefined, 2)); | ||
return this.getPreamble("") + '\n' + ESPGEN.generate(program, codegenOptions) + '\n'; | ||
return this.getPreamble(originalCode || '') + '\n' + ESPGEN.generate(program, codegenOptions) + '\n'; | ||
}, | ||
@@ -411,0 +413,0 @@ /** |
{ | ||
"name": "istanbul", | ||
"version": "0.1.41", | ||
"version": "0.1.42", | ||
"description": "Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale", | ||
@@ -5,0 +5,0 @@ "keywords": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ], |
@@ -114,3 +114,4 @@ /*jslint nomen: true */ | ||
fileCov = cov[Object.keys(cov)[0]]; | ||
test.ok(fileCov.code); | ||
test.ok(fileCov.code.length > 1); | ||
test.ok(fileCov.code[1] === 'output = x;'); | ||
test.done(); | ||
@@ -117,0 +118,0 @@ } |
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
398246
8563