Skip to content

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

License

Notifications You must be signed in to change notification settings

smlgbl/grunt-casperjs-extra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published