Skip to content

Build: Add Istanbul for code coverage reports #143

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

Closed
wants to merge 1 commit into from
Closed

Conversation

dmethvin
Copy link
Member

@dmethvin dmethvin commented Feb 4, 2016

Coverage test is running against the Phantom build but it's still useful for some basic sanity checking. It will become more so once we move to supporting only a single version of jQuery and don't conditionally fill APIs.

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @markelog, @jzaefferer and @mgol to be potential reviewers

@mgol
Copy link
Member

mgol commented Feb 10, 2016

Wow, I wouldn't expect it to be so easy to add. :)

@markelog
Copy link
Member

That's instanbul over phantom, without need for ajax requests, shouldn't be hard at all

"qunitjs": "1.17.1",
"testswarm": "~1.1.0"
},
"scripts": {
"prepublish": "grunt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@markelog
Copy link
Member

Might be good idea to add integration with coveralls too

@@ -122,7 +131,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-qunit");
grunt.loadNpmTasks("grunt-qunit-istanbul");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should consider using load-grunt-tasks like we do in core?

@markelog
Copy link
Member

Also, you might as well add integration with travis

@dmethvin dmethvin closed this in 86de1f8 Feb 12, 2016
@markelog
Copy link
Member

@dmethvin i see you added travis, but what about my other comments?

@dmethvin
Copy link
Member Author

The prepublish is gone, something added it automatically. The phantomjs-polyfill isn't needed with grunt-qunit-istanbul afict, the tests pass fine without it so it's not a direct dependency. And if i don't generate coverage info regularly i won't look at it 😸

@markelog
Copy link
Member

If you modify the package dependencies, you have to run grunt npmcopy, since we don't use other means.

In other words polyfill is still there - https://github.com/jquery/jquery-migrate/tree/a79bc6e9bf9e9a4aa3b2bb273db4f99735ba61dd/external/phantomjs-polyfill

And -

<script src="../external/phantomjs-polyfill/bind-polyfill.js"></script>

But if you remove it, the tests will fail, grunt-qunit-istanbul doesn't add their own thing.

And if i don't generate coverage info regularly i won't look at it

If you integrate with coveralls, you can add a badge to the readme and also see how coverage changed with every pull request, since coveralls bot will tell you about it.

For example see express repo - https://github.com/expressjs/express

Also, what about load-grunt-tasks package?

@markelog
Copy link
Member

since coveralls bot will tell you about it.

I meant hook there

@dmethvin
Copy link
Member Author

Oh man I forgot about npmcopy, just like I used to forget about bowercopy. The dependencies don't change often enough for it to be a habit. I can add the load-grunt-tasks stuff but in some ways I like doing it explicitly so I know what I've loaded.

@markelog
Copy link
Member

I like doing it explicitly so I know what I've loaded.

Ok-ok, totally reasonable

What about coveralls? I can provide a pull for that this weekend, if that too big task to dig.

@dmethvin
Copy link
Member Author

Sure, sounds good. I'm sure you can do it in your sleep!

@dmethvin dmethvin deleted the istanbul branch February 25, 2016 19:59
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

Successfully merging this pull request may close these issues.

5 participants