n1k0/casperjs — pull request #896 by r8k (2014-04-22 06:33:23+00:00)
Title: add json configuration option for tests

* provide a cli argument for config.json file
* parse arguments & options from config.json
* ensure config.json is valid and can be required
* ensure args & opts are stored back in phantom.casperArgs.raw
* fixes #745

- a config.json can look like:
{
"includes": [
"inc1.js",
"inc2.js"
],
"log-level": "debug",
"paths": [
"test.js",
"sub1"
],
"post": [
"post1.js",
"post2.js"
],
"pre": [
"pre1.js",
"pre2.js"
],
"verbose": true,
"xunit": "results.xml"
}

- tests can be run using:
$ casperjs test ./config.json

- note that, the config file is not a key word argument, since
there are no additional arguments that you need to pass into
the cli, if you provide a config.json.