Matthias Reuter wrote: > Now the question is, how do I unit-test [functions encapsulated in a closure]?
You don't. I would suggest avoiding the build-time changes. Note that unit testing should only ever be performed on public APIs. If your functions need to be tested, then they should be exposed. You can use one of the functional test frameworks to ensure that the code works in conjunction with other elements of your system. If you're feeling a need to test these, then you probably do need to. But that means you should not bury them entirely inside your module. -- Scott -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com