Testing for jQuery Plugins?

Testing for jQuery Plugins?


Hello all,
My understanding is that, when writing plugins for jQuery, there are a
couple best practices to follow. That the plugin limit itself to a
single namespace, and also that as much remain private, via closures,
in the plugin as possible, so as to expose a clean API. This all makes
perfect sense to me; keep things clean.
I have written some tests that cover pretty much all of the exposed
API for my plugin, and after a pretty big refactor, I have broken a
couple things. Now, since the tests cover the higher level, abstracted
API only, and not the private methods, I only have a very general idea
where the code is failing.
I was just wondering, what do you guys do in situations like this? I
know there is probably no magic bullet, but I am curious what
techniques other developers use to test the functionality of their
code that isn't publicly exposed.
So far, the best I have come up with is copy pasting each private
function to the firebug console. This is beyond tedious, and slow, and
I know there has to be a better way. Plus, it isn't automated, like
the rest of my tests.
Any suggestions?
Thanks a lot.
_Nick_