Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.74 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.74 KB

grunt-casperjs-extra

Build Status

Take care of installation of casperjs and phantomjs and run casperjs tests using grunt

warning!

This will install the current master branch of CasperJS, which includes the new testing layout. See the test example in tests/.

why, oh why?

phantomjs is available as an npm package, also used e.g. by grunt-contrib-jasmine to run unittests. Theoretically casperjs could be available as well, but their package.json names an unusable dependency. Of course, from their point of view this makes sense, because casperjs is not meant to be used as a node package. But from a packaging point of view, it does make sense. What we want: just call 'grunt casperjs', which will execute our casperjs tests. Therefore this package. Please try it and let me know if you have a better way of handling the PATH problem that comes up. Please also keep an eye on the original issue, which should be the ultimate solution and make this quickfix obsolete.

but how?

This is done by using a fork of casperjs with a modified package.json (see here: ), so that the phantomjs dependency can be resolved, without the need to manually install it. The grunt-env plugin is used to set the PATH where casperjs was downloaded (via GIT) and to tell casperjs where to find phantomjs.

what to do?

   sudo npm install -g grunt
   git clone git@github.com:smlgbl/grunt-casperjs-extra.git
   cd grunt-casperjs-extra/
   npm install
   grunt