javascript - Zombie.js firing a visit callback before GET request completes -
i'm running issue using zombie.js access localhost url seems fire visit
callback before "response" event returns. @ least, before "zombie: http://localhost/ => 200"
message logged in debug mode.
var browser = require('zombie'); browser.visit('http://localhost/', { debug: true }, function (err, browser) { if (err) throw err; console.log(browser.success, err); } );
when run this, following:
zombie: opened window http://localhost/ zombie: event loop empty false undefined zombie: http:/localhost/ => 200
when run on live site, following:
zombie: opened window http://mylivesite.com/ zombie: http:/mylivesite.com/ => 200 zombie: loaded document http://mylivesite.com/ zombie: event loop empty true undefined
any reason why console.log(browser.success, err)
runs before request when i'm running on localhost? maxwait
set 10s, still no luck.
Comments
Post a Comment