caolan/nodeunit — pull request #132 by pmlopes (2011-11-16 14:42:11+00:00)
Title: Fix for node 0.4.x/nodeunit >0.5.5 crash of junit report on large test trees

I have a project with 2 top level tests with chained sub tests. I notice that when using the junit reporter, nodeunit crashes during io write to disk with exit code 1.

I've tryed to debug the issue but even doing console.log of the renderer junit report or even the module object causes a crash.

I notice that if i write in a synchronous way then the problem does not exist. I've re-wrote the junit write to be synchronous and fixes the bug.

Please review this fix and consider it for inclusion,
Thanks!