Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN badge returned if no methods in tested code #25

Open
ycao56 opened this issue Jun 16, 2016 · 2 comments
Open

NaN badge returned if no methods in tested code #25

ycao56 opened this issue Jun 16, 2016 · 2 comments

Comments

@ycao56
Copy link

ycao56 commented Jun 16, 2016

When the code doesn't contain any methods, the generated coverage report won't calculate the coverage for methods.
However, the functionRate is still being calculated and returning a NaN. Thus causing the overall rate to be NaN

@marcellodesales
Copy link
Member

@ycao56 Can you add a code sample? I'd like to reproduce and see a viable patch. Thanks!

@ycao56
Copy link
Author

ycao56 commented Aug 18, 2016

A simple express app would be a good sample.

var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('Hello World!');
});

app.listen(3000, function () {
  console.log('Example app listening on port 3000!');
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants