Running tests in headless mode with PhantomJS