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

No coverage table by npm run karma #115

Closed
mbakker96 opened this issue Jul 4, 2016 · 6 comments
Closed

No coverage table by npm run karma #115

mbakker96 opened this issue Jul 4, 2016 · 6 comments

Comments

@mbakker96
Copy link
Contributor

Hi,

I don't get a coverage table after running npm run karma in the clicker app and my own project.

SUMMARY:
✔ 27 tests completed
----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
----------|----------|----------|----------|----------|----------------|
All files |      100 |      100 |      100 |      100 |                |
----------|----------|----------|----------|----------|----------------|

I'm trying to solve this problem by reading the coverage documentation and look for difference in the code and the docs.

Martijn

@lathonez
Copy link
Owner

lathonez commented Jul 4, 2016

I also get no coverage from npm run karma.

I wouldn't put too much time into it, it's a debug mode anyway so you're not going to be looking there for coverage. If anything coverage data is going to just get in the way when we're trying to debug.

We could disable coverage in debug mode:

x220:~/code/clicker$ git diff test/gulpfile.ts
diff --git a/test/gulpfile.ts b/test/gulpfile.ts
index 85a6a37..fc4b19d 100644
--- a/test/gulpfile.ts
+++ b/test/gulpfile.ts
@@ -71,6 +71,7 @@ gulp.task('karma-debug', (done: Function) => {
     configFile: join(process.cwd(), config.testDir, 'karma.config.js'),
     singleRun: false,
     browsers: ['Chrome'],
+    reporters: ['mocha'],
   };

@mbakker96
Copy link
Contributor Author

Good plan!

The coverage/ folder works good when running karma. (Maybe good to know)

@lathonez
Copy link
Owner

lathonez commented Jul 4, 2016

The coverage/ folder works good when running karma. (Maybe good to know)

@mbakker96 What do you mean, sorry?

@lathonez lathonez reopened this Jul 4, 2016
@lathonez
Copy link
Owner

lathonez commented Jul 4, 2016

Leaving open to track the above change

@mbakker96
Copy link
Contributor Author

When you run npm run karma the coverage website is created without any errors

@lathonez
Copy link
Owner

lathonez commented Jul 4, 2016

Interesting, thanks.

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