sglanzer-deprecated/ember-cli-blanket

executed lines not marked as covered

Closed this issue · 5 comments

It would appear that export is the only thing not covered in my code. Shouldn't export be ignored or something? What's going on here?

screen shot 2016-03-01 at 5 41 43 pm

is that a screenshot from the browser? or external report?

we know that the exports are being transpiled

what version of ember? ember-cli-blanket?

@jschilli that is a screenshot from Code Climate.

I'm on Ember 2.3.1 and ember-cli-blanket 0.8.0

Is it supposed to run coverage on the transpiled code and not the original code?

My options look like this, I might have messed up:

var options = {
  modulePrefix: 'ember-math-helpers',
  filter: '//.*ember-math-helpers/.*/',
  antifilter: '//.*(tests|template).*/',
  loaderExclusions: [],
  enableCoverage: true,
  cliOptions: {
    reporters: ['lcov'],
    autostart: true,
    lcovOptions: {
      outputFile: 'lcov.dat',
      renamer: function (moduleName) {
        var expression = /^ember-math-helpers/;
        return moduleName.replace(expression, 'addon') + '.js';
      }
    }
  }
};

Okay, I looked at localhost:4200/tests, and it is transpiled. Now the uncovered part is the actual inside of the function. I'm not sure how it's not covered though. My test correctly does the addition, and it passes, so I am not sure why it is listed as not covered.

test('addition works', function(assert) {
  let result = add([20, 10]);
  assert.equal(result, 30);
});

screen shot 2016-03-01 at 9 21 48 pm

@jschilli looks like this may be related to #105

This code is clearly exectued, but not marked as covered. I saw the fix there was to downgrade loader.js. Is there a way to fix this or update the library so we don't have to downgrade?

This should be fixed with 0.9.1