Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
ce066ab8
...
ce066ab87810a9763e324f72c5c1ce961b6c0d60
authored
2013-01-09 09:21:58 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
exit when trying to use .test in a non-test env
1 parent
df4a9c2f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
modules/casper.js
modules/casper.js
View file @
ce066ab
...
...
@@ -157,8 +157,7 @@ var Casper = function Casper(options) {
this
.
_test
=
undefined
;
this
.
__defineGetter__
(
'test'
,
function
()
{
if
(
!
phantom
.
casperTest
)
{
this
.
emit
(
'tester.called'
);
return
;
this
.
die
(
'casper.test property is only available using the `casperjs test` command'
);
}
if
(
!
utils
.
isObject
(
this
.
_test
))
{
this
.
_test
=
tester
.
create
(
this
);
...
...
@@ -166,10 +165,6 @@ var Casper = function Casper(options) {
return
this
.
_test
;
});
this
.
once
(
'tester.called'
,
function
()
{
this
.
warn
(
'please use `casperjs test` command'
);
});
// init phantomjs error handler
this
.
initErrorHandler
();
...
...
Please
register
or
sign in
to post a comment