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

Report out_text_summary not working #20

Open
cgalvarez opened this issue Sep 7, 2016 · 4 comments
Open

Report out_text_summary not working #20

cgalvarez opened this issue Sep 7, 2016 · 4 comments

Comments

@cgalvarez
Copy link

Expected Behavior

The report out_text_summary should output something.

Current Behavior

The report out_text_summary does not output any report file and always outputs the message coverage error: Failed to save cobertura report (without exception trace).

Possible Solution

No idea.

Steps to Reproduce (for bugs)

Executed any of the following commands:

spacejam test-packages --driver-package practicalmeteor:mocha --coverage out_text_summary packages/my-package
spacejam-mocha --coverage out_text_summary packages/my-package

Context

I was trying to test the outputs of the multiple implemented available reports and didn't be able to get the report out_text_summary working.

Your Environment

@serut
Copy link
Owner

serut commented Sep 7, 2016

My bad, it should be fixed with that commit on spacejam. Can you retest please ?

@cgalvarez
Copy link
Author

The file summary.txt is now generated, but the text coverage error: Failed to save text report is printed to the console (not as an error, but as normal output text).

phantomjs exit with code 7 (following is the output of my npm run test command):

Tests are ok! Meteor-coverage is saving client side coverage to the server. Client js files saved  {"SUCCESS":47,"FAILED":0,"TOTAL":47}
coverage error: Failed to save text report
spacejam: phantomjs exited with code: 7
spacejam: killing meteor
spacejam: meteor killed with signal: SIGTERM
spacejam: Unknown error with exit code '7'. Exiting.

npm ERR! Linux 4.7.0-040700-generic
npm ERR! argv "/home/user/.nvm/versions/node/v6.3.1/bin/node" "/home/user/.nvm/versions/node/v6.3.1/bin/npm" "run" "test"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test: `rm -rf coverage; mkdir -p coverage; spacejam-mocha --coverage "out_text_summary" ./`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the [email protected] test script 'rm -rf coverage; mkdir -p coverage; spacejam-mocha --coverage "out_text_summary" ./'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meteor-my-package package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rm -rf coverage; mkdir -p coverage; spacejam-mocha --coverage "out_text_summary" ./
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-my-package
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meteor-my-package
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /home/user/meteor-app/packages/my-package/npm-debug.log

The content of summary.txt is:

=============================== Coverage summary ===============================
Statements   : 13.3% ( 31/233 )
Branches     : 0.76% ( 1/131 )
Functions    : 5.56% ( 2/36 )
Lines        : 13.9% ( 31/223 )
================================================================================

I think that the file is successfully created (you will have to confirm me that's the expected content) but somewhere istanbul throws an error.

@serut
Copy link
Owner

serut commented Sep 8, 2016

Yeap, this is the expected behavior, you can compare with the global coverage on the root HTML report.
It's quite strange because there is an end to end test to check that export.
https://github.com/serut/meteor-coverage/blob/master/client/methods.e2e.tests.js#L101-L116

@cgalvarez
Copy link
Author

I've retested a couple times more, and always get like above:

coverage error: Failed to save text report
spacejam: Unknown error with exit code '7'. Exiting.

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