Permalink
Browse files

Fixed issue with cased header in the report generator

  • Loading branch information...
1 parent 94ebd7a commit 1c42d6bb74071d1f3cc95f278af2073cff4521d0 @davglass davglass committed Oct 2, 2012
Showing with 4 additions and 7 deletions.
  1. +1 −1 configs/istanbul/ending.js
  2. +3 −6 lib/cmds/serve.js
@@ -37,7 +37,7 @@
method: 'POST',
data: Y.JSON.stringify(__coverage__),
headers: {
- 'Content-type': 'application/json'
+ 'Content-Type': 'application/json'
},
on: {
complete: function(id, e) {
View
@@ -141,9 +141,7 @@ mods = {
var name = path.join('build', file.split('build')[1]);
name = name.replace('-coverage', '');
fs.readFile(file.replace('-coverage', ''), 'utf8', function(err, data) {
- var inst = new istanbul.Instrumenter({
- embedSource: true
- });
+ var inst = new istanbul.Instrumenter();
inst.instrument(data, name, function(err, source) {
source += '\n' + ending;
callback(err, source);
@@ -170,14 +168,13 @@ mods = {
this.app.post('/tests/results', function (req, res) {
process.chdir(gbase);
- var collect,
- report;
log.debug('got istanbul results, generating report in ' + istanbulBase);
if (util.exists(istanbulBase)) {
rimraf.sync(istanbulBase);
}
mkdirp(istanbulBase, function() {
- var jsonFile = path.join(istanbulBase, 'istanbul.json');
+ var jsonFile = path.join(istanbulBase, 'istanbul.json'),
+ collect, report;
log.debug('writing coverage json here: ' + jsonFile);
fs.writeFileSync(jsonFile, JSON.stringify(req.body, null, 4), 'utf8');
collect = new istanbul.Collector();

0 comments on commit 1c42d6b

Please sign in to comment.