Is it possible to unit test javascript functions that exist within a closure, so for example, given the following:
(function() { var a = function() { /
Your anonymous function could take a parameter which would be undefined when not in test mode, and say this parameter would be an object, you could fill the object with a's without exposing a directly.
a
Just my .02$