This little CLI tool will aid YUI developers with their code coverage for the library.
npm -g i yui-coverage
cd yui3/src/dd yui-coverage
Then open a browser to: http://127.0.0.1:3000/
This will load the tests from:
On the fly, it will run YUITest's test coverage tool on the files as they are loaded in the browser. Then when it's complete it will display the Code Coverage results.
Note: It will only run coverage on a module that belongs to the directory
it's currently serving from. In the above example, it will only encode
This way you get code coverage for your individual module and not all of the modules in
You could even check out the coverage that this module covers of another module:
cd yui3/src/dd yui-coverage -m yui,dd,base
This will cover all of the
base modules too. So you can see how much code from
those modules are actually being tested.
For example, with the
dd module you might see that you have 100% test coverage for
But when you add
event to the mix you might only be using 50% of those modules.
That gives you a good idea on maybe using less modules if they are not needed.