asciidisco / grunt-qunit-istanbul

Run QUnit unit tests in a headless PhantomJS instance & generate some nice code coverage metrics using Istanbul.
MIT License
33 stars 21 forks source link

@examples syntax #27

Closed fru closed 10 years ago

fru commented 10 years ago

Hey @asciidisco this PR adds the @examples syntax to grunt-qunit-istanbul:

/**
 * @examples
 * isInteger(5)     // true
 * isInteger(5.0)   // true
 * isInteger(-5)    // true
 * isInteger(3.14)  // false
 * isInteger('foo') // false
 * isInteger(NaN)   // false
 */
function isInteger(x) {
  return x === Math.floor(x);
}

The @examples are run like tests and increase the code coverage. The underlying library is jsdoc-at-examples.

asciidisco commented 10 years ago

Hey, thanks for your hard work in putting together this PR. I´m very sorry, but I think I will not merge this one :/

The thing is that I don't see that this belongs in this library & its core functionality. I think you should publish your fork on npm as its own module; that makes more sense to me.

I´m really sorry, especially because when I see that this is a really "good" PR, adding documentation, etc...