This is not an asynchronous call (and does throw an exception in the current node.js master):
setTimeout(__calculate(), 0);
You could use setTimeout(__calculate, 0);, but recursive setTimeout calls are slowed down (to avoid tasks hogging the CPU, I assume), which leads to timeouts in the test cases. Maybe just go for setImmediate or similar here?
This is not an asynchronous call (and does throw an exception in the current node.js master):
You could use
setTimeout(__calculate, 0);, but recursivesetTimeoutcalls are slowed down (to avoid tasks hogging the CPU, I assume), which leads to timeouts in the test cases. Maybe just go forsetImmediateor similar here?