fixed getting .test property exits casper in non-test env
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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); | ... | ... |
-
Please register or sign in to post a comment