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 code coverage for front-end unit tests #73

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

treyhunner
Copy link
Contributor

  • Generate code coverage reports
  • Report code coverage to coveralls

Notes:

- browserify-istanbul is used instead of a karma-coverage preprocessor
  because of this bug:
  karma-runner/karma-coverage#16 (comment)
- karma-coverage version pinned to 0.2.6 to workaround this bug:
  karma-runner/karma-coverage#123 (comment)
@treyhunner treyhunner force-pushed the add-backbone-code-coverage branch from 5a67f24 to cae7457 Compare February 18, 2015 21:22
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling cae7457 on add-backbone-code-coverage into * on master*.

@treyhunner
Copy link
Contributor Author

This is ready for code review

@goldlilys
Copy link
Contributor

When I run gulp test, all tests pass but the coveralls has errors

ERROR [coverage]: [TypeError: Cannot call method 'split' of undefined]
TypeError: Cannot call method 'split' of undefined
at HtmlReport.Report.mix.writeDetailPage (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:391:31)
at /Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:468:26
at SyncFileWriter.extend.writeFile (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/util/file-writer.js:57:9)
at FileWriter.extend.writeFile (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/util/file-writer.js:147:23)
at /Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:467:24
at Array.forEach (native)
at HtmlReport.Report.mix.writeFiles (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:461:23)
at /Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:463:22
at Array.forEach (native)
at HtmlReport.Report.mix.writeFiles (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:461:23)
at HtmlReport.Report.mix.writeReport (/Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/node_modules/istanbul/lib/report/html.js:553:14)
at /Users/goldlilys/dev/start/week7/fullstack-project-01/node_modules/karma-coverage/lib/reporter.js:138:24
at Object.oncomplete (fs.js:108:15)

DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir /var/folders/g7/f6s075793fg7b9spwxnrqp_w0000gn/T/karma-55211399
INFO [coveralls.io]: uploading...
INFO [coveralls.io]: 422 --- {"message":"Couldn't find a repository matching this job.","error":true}

I redid npm install, but did the same thing.

@treyhunner
Copy link
Contributor Author

@goldlilys coveralls isn't supposed to work locally. We could use an environment variable to disable it locally. @tbashor @michaelerobertsjr thoughts on that?

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

Successfully merging this pull request may close these issues.

3 participants