I first downloaded a tar with a version of Phantom from their official web. I had to
check that I had
GLIBC_2.7. Then I copied the files under
/opt, which is the path under which I normaly install these things.
It didn't work so I tried also a gist that I found on GitHub.
It didn't work either, so I decided to use the not-recommended way, which is building it from source. It recommends to install the
ttf-mscorefonts-installer package, which you can find in synaptics or the Ubuntu Software Center.
For the record, the
git clone command took a while, and it downloaded 130MB of files. The
git submodule update command took long as well.
I moved all the stuff to
/opt, then I added this line to my
.bashrc (add it to
.bash_profile instead if you are in OSX):
Then you can run it with
- I tried the
gulp-jasmine-phantomplugin, but for some reason it didn't find the tests.
- I also installed phantom-jasmine, another npm package, and ran:
phantom-jasmine js/specrunner.html phantom-jasmine http://localhost:4000/test/specrunner.html
specrunner.htmlis my Jasmine running file) All of them gave me an error, and it made a
runner.htmlfile in the local directory.
However, testem with a config file works. Both
testem ci work.
testem ci command generates a Jasmine page for you. So if you want to add divs to the
specrunner.html file, you have to tell the
testem.json file and then add
/testem.js to the specrunner scripts.
If you have to use
jquery-jasmine, you also have to add those to the
testem.json. These days I am not too queen on jQuery anymore, so I don't use it in new projects.