Skip to content


Subversion checkout URL

You can clone with
Download ZIP
a Jasmine runner for Phantom.js
JavaScript CoffeeScript
Branch: master

Merge pull request #9 from josephwilk/master

Print the full name of the test rather than just the description
latest commit c5ff6cea60
@jcarver989 authored


Phantom-Jasmine is a simple set of two scripts for running your Jasmine Tests via Phantom.js ( The first script lib/console-runner.js is a plugin to Jasmine that outputs test results (with ansi color codes) via console.log (included with a script tag inside TestRunner.html). The second script lib/ takes an html file as it's first and only argument and then executes any Jasmine tests that file loads. See below for more detail.


Assuming you have PhantomJs setup and installed...

sudo npm install phantom-jasmine -g

Running Tests

phantom-jasmine examples/TestRunner.html

On some running OS X you might have to pass in the full url, ex:

phantom-jasmine file://localhost/Users/bob/phantom-jasmine/examples/TestRunner.html 

If everything works you should see output like this in your terminal:

Util : should fail for the example
Error: Expected false to be truthy.

3 specs, 1 failure in 0.024s.

To run your own tests with Phantom-Jasmine just look at TestRunner.html and modify/copy the script tags accordingly.

Something went wrong with that request. Please try again.