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

Setup travis & coverage #1

Closed
RamyElkest opened this issue Oct 24, 2016 · 7 comments
Closed

Setup travis & coverage #1

RamyElkest opened this issue Oct 24, 2016 · 7 comments

Comments

@RamyElkest
Copy link
Owner

and add to readme

@glowcone
Copy link

Hi, I came from hacktoberfest and would like to work on this

RamyElkest added a commit that referenced this issue Oct 25, 2016
@RamyElkest
Copy link
Owner Author

Thanks @recurza
I set up travis and coveralls, however coveralls needs some setting up on the repository side

( we probably need to npm i --save istanbul coveralls ) then follow https://github.com/nickmerwin/node-coveralls#istanbul

That requires setting a .yml.coveralls with a config, there should be a quick tutorial out there

let me if you still want to take it / need some help 👍

@glowcone
Copy link

Sure I'll try to set it up 😁

@glowcone
Copy link

glowcone commented Oct 29, 2016

I'm a bit confused: the coveralls website said Travis users don't need a coveralls.yml. So we are using istanbul instead of travis?
Also when I setup istanbul/mocha, it said there were no test files.

RamyElkest added a commit that referenced this issue Oct 29, 2016
@RamyElkest
Copy link
Owner Author

RamyElkest commented Oct 30, 2016

You're right @recurza we don't need a yml file 👍

So mocha is the testing framework, istanbul is coverage library which determines how much is covered by the tests, and travis is the continuous integration which runs all these on every pull request.

the tests are currently in api/**/*.test.js (passing this to mocha should have found them)
but (currently) we also have to pass the --compilers argument to mocha (and istanbul) for it to work with es6.

even after this is set up, istanbul reports "no coverage information found", this is probably linked to gotwarlost/istanbul#262, which suggested using babel-istanbul.

switching to babel-istanbul worked.. but it wasn't as straight forward as i thought.. so sorry about that ;)

let me know if you have any questions

@glowcone
Copy link

oh I see. Thanks for explaining :)

@RamyElkest
Copy link
Owner Author

Thank you for looking into it 💯

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

No branches or pull requests

2 participants