Commit 9d8e2777 9d8e27776aeb44825d69ce699b25cf0c688b20c2 by Nicolas Perriault

added warning for when trying to use casper in a node env

1 parent c543ddab
......@@ -28,9 +28,14 @@
*
*/
/*global console, phantom, require:true*/
/*global process, console, phantom, require:true*/
/*jshint maxstatements:30, maxcomplexity:10*/
// node check
if (process && process.title === "node") {
console.error('CasperJS cannot be executed within a nodejs environment');
}
// phantom check
if (!phantom) {
console.error('CasperJS needs to be executed in a PhantomJS environment http://phantomjs.org/');
......