Commit deb290f0 deb290f097d402e2cba13ddc3d03899104ddae8e by Nicolas Perriault

fixed getting .test property exits casper in non-test env

1 parent 6ea9a841
...@@ -157,7 +157,7 @@ var Casper = function Casper(options) { ...@@ -157,7 +157,7 @@ var Casper = function Casper(options) {
157 this._test = undefined; 157 this._test = undefined;
158 this.__defineGetter__('test', function() { 158 this.__defineGetter__('test', function() {
159 if (!phantom.casperTest) { 159 if (!phantom.casperTest) {
160 this.die('casper.test property is only available using the `casperjs test` command'); 160 throw new CasperError('casper.test property is only available using the `casperjs test` command');
161 } 161 }
162 if (!utils.isObject(this._test)) { 162 if (!utils.isObject(this._test)) {
163 this._test = tester.create(this); 163 this._test = tester.create(this);
......