Skip to content

problem with yogi coverage giving "NaN%" - solved for me! #46

Closed
stlsmiths opened this Issue Jan 9, 2013 · 1 comment

2 participants

@stlsmiths

So I converted another old gallery module (gallery-datatable-formatters) per the "New Gallery Integration" writeup ... including yogi update. Everything went fine, apparently.

I upgraded my code, added tests, etc..

I noticed in the tests/unit/index.html (that was created by yogi update) that the following was set;

YUI({
    coverage: ['datatable-formatters'],
    filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw'
}).use( 

when I ran the test coverage report (and also with istanbul) I got the "NaN%" stuff. After awhile, I checked the instrumentation file at /build/../gallery-datatable-formatters-coverage.js and noticed it
used a different "_yuitest_coverage" setup.

So when I went back to my index.html and changed this,

coverage: ['gallery-datatable-formatters'],

It worked fine, gave proper coverage statistics.

So in my case I think yogi update incorrectly setup the tests/unit/index.html with the wrong coverage flag.

Might be a bug possibly in yogi update, not sure if it still fixes my #35, or hatch's #44 or #45

@davglass davglass closed this in 09d6a49 Jan 11, 2013
@davglass davglass was assigned Jan 11, 2013
@davglass
YUI Library member

This will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.