class Main extends buddy.SingleSuite {
public function new() {
describe("test", {
for (i in 0...1000) it("should pass", function (done) done());
});
}
}
And It makes to be able to use haxe.Timer.delay() in neko.
The async tests are run in other thread that is created by AsyncTools.wait(). AsyncTools.wait() creates a new thread each time on neko, so many async test cases crash neko.
The main thread waits testsDone (all async tests completion) using the while statement. So the main thread is busy, and other statements can't run in the main thread.
haxe.Timer.delay() doesn't work, because that is implemented using haxe.MainLoop (and haxe.EntryPoint). haxe.MainLoop runs in the main thread. (Maybe haxe.MainLoop can run in any thread, but I couldn't success it.)
Fix #73 .
It makes this code work in neko.
And It makes to be able to use haxe.Timer.delay() in neko.