fixes #140 - 'casper test' now resolves local paths urls
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -41,7 +41,7 @@ casper.options.logLevel = casper.cli.get('log-level') || "error"; | ... | @@ -41,7 +41,7 @@ casper.options.logLevel = casper.cli.get('log-level') || "error"; |
41 | // overriding Casper.open to prefix all test urls | 41 | // overriding Casper.open to prefix all test urls |
42 | casper.setFilter('open.location', function(location) { | 42 | casper.setFilter('open.location', function(location) { |
43 | if (!/^http/.test(location)) { | 43 | if (!/^http/.test(location)) { |
44 | return f('file://%s/%s', phantom.casperPath, location); | 44 | return f('file://%s/%s', fs.workingDirectory, location); |
45 | } | 45 | } |
46 | return location; | 46 | return location; |
47 | }); | 47 | }); | ... | ... |
-
Please register or sign in to post a comment