busterjs / grunt-buster

Grunt task for running Buster.JS tests in Node.js or headless in PhantomJS
MIT License
35 stars 14 forks source link

Delay the runPhantomjs resolve until the process outputs something #1

Closed feelepxyz closed 12 years ago

feelepxyz commented 12 years ago

Hey, awesome stuff here.

Had some problems running this though, got the "No slaves captured, session not created." error almost every time. runPhantomjs seemed to be resolving before it had captured the buster server.

So I changed it to wait for some output from the process and then resolve. Doesn't feel like the best approach though.. feels overly slow too.

Are you running this part without problems?

Adding this as a pull request for discussion.

Cheers

thedersen commented 12 years ago

Hi, and thanks for the contribution!

Was thinking that this might be a problem when I created it, but I have not encountered it myself (yet). Will pull this in and release a new version.

Regarding speed, the implementation is sort of a temporary solution until I can figure out some issues with using the buster api directly. This will remove the need to spawn child processes to run buster, and hopefully improve the speed.

feelepxyz commented 12 years ago

Sweet! Been running this all over the place, so nice not needing to do all the server/capture stuff for quick tests :) Yeah, been poking around buster hooks, pretty powerful stuff. Might take a stab at that too!