Jump To …

index.coffee

Make sure Contextify is available to JSDOM

undefined

zombie.visit(url, callback)

zombie.visit(url, options, callback)

Creates a new Browser, opens window to the URL and calls the callback when done processing all events.

For example: zombie = require("zombie")

vows.describe("Brains").addBatch(
  "seek":
    topic: ->
      zombie.browse "http://localhost:3000/brains", @callback
  "should find": (browser)->
    assert.ok browser.html("#brains")[0]
).export(module);
  • url -- URL of page to open
  • options -- Initialize the browser with these options
  • callback -- Called with error, browser
undefined

listen port, callback

listen socket, callback

listen callback

Ask Zombie to listen on the specified port for requests. The default port is 8091, or you can specify a socket name. The callback is invoked once Zombie is ready to accept new connections.

undefined

console.log(browser) pukes over the terminal, so we apply some sane defaults. You can override these: console.depth - How many time to recurse while formatting the object (default to zero) console.showHidden - True to show non-enumerable properties (defaults to false)

undefined

Default to debug mode if environment variable DEBUG is set.

undefined

Export the globals from browser.coffee

undefined