node package manager



brew install phantomjs
sudo npm install phantom-jasmine -g

Loading source files

By default phantom-jasmine will look for a json file in spec/config.json. Use this to list all the scripts you want to load before your specs. e.g.


If you want to put this file elsewhere use the --config flag, e.g.

phantom-jasmine --config tests/config.json

Running Tests


Or run specific specs

phantom-jasmine spec/path/my_spec.js
phantom-jasmine spec/path/

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.