added `--log-level` and `--direct` options to `casper test` command
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -10,6 +10,10 @@ var casper = require('casper').create({ | ... | @@ -10,6 +10,10 @@ var casper = require('casper').create({ |
10 | faultTolerant: false | 10 | faultTolerant: false |
11 | }); | 11 | }); |
12 | 12 | ||
13 | // Options from cli | ||
14 | casper.options.verbose = casper.cli.get('direct') || false; | ||
15 | casper.options.logLevel = casper.cli.get('log-level') || "error"; | ||
16 | |||
13 | // Overriding Casper.open to prefix all test urls | 17 | // Overriding Casper.open to prefix all test urls |
14 | casper.setFilter('open.location', function(location) { | 18 | casper.setFilter('open.location', function(location) { |
15 | if (!/^http/.test(location)) { | 19 | if (!/^http/.test(location)) { | ... | ... |
-
Please register or sign in to post a comment