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) {
this._test = undefined;
this.__defineGetter__('test', function() {
if (!phantom.casperTest) {
this.die('casper.test property is only available using the `casperjs test` command');
throw new CasperError('casper.test property is only available using the `casperjs test` command');
}
if (!utils.isObject(this._test)) {
this._test = tester.create(this);
......