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
ecb8b67e
...
ecb8b67e567709fce6d727e4470bf8098d0459c7
authored
2013-08-02 16:45:47 -0600
by
hexid
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Allow test cases to use directory when only the script name is passed
1 parent
c62b646b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
bin/bootstrap.js
bin/bootstrap.js
View file @
ecb8b67
...
...
@@ -233,7 +233,11 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
phantom
.
casperScript
=
fs
.
absolute
(
fs
.
pathJoin
(
baseTestsPath
,
'run.js'
));
phantom
.
casperTest
=
true
;
casperArgs
.
drop
(
"test"
);
phantom
.
casperScriptBaseDir
=
fs
.
dirname
(
casperArgs
.
get
(
0
));
var
scriptDir
=
fs
.
dirname
(
casperArgs
.
get
(
0
));
if
(
scriptDir
===
casperArgs
.
get
(
0
))
{
scriptDir
=
'.'
;
}
phantom
.
casperScriptBaseDir
=
scriptDir
;
}
else
if
(
casperArgs
.
get
(
0
)
===
"selftest"
)
{
phantom
.
casperScript
=
fs
.
absolute
(
fs
.
pathJoin
(
baseTestsPath
,
'run.js'
));
phantom
.
casperSelfTest
=
phantom
.
casperTest
=
true
;
...
...
Please
register
or
sign in
to post a comment