Commit 1391561b 1391561b5a3cf4bcfb3d4cdecd62843c813cbc83 by Nicolas Perriault

fixed #187 - added a --no-colors option to casper test command

1 parent 6f4899a2
......@@ -8,6 +8,7 @@ XXXX-XX-XX, v1.0.0
- fixed [#164](https://github.com/n1k0/casperjs/issues/164) - ability to force CLI parameters as strings (see [related documentation](http://casperjs.org/cli.html#raw)).
- fixed [#153](https://github.com/n1k0/casperjs/issues/153) - erroneous mouse event results when event.preventDefault() was used.
- closed [#180](https://github.com/n1k0/casperjs/issues/180) - CasperJS tests are now run against a local HTTP test server. A new `casper selftest` command has been added as well.
- added a `--no-colors` option to the `casper test` command to skip output coloration
2012-06-26, v1.0.0-RC1
----------------------
......
......@@ -3,6 +3,7 @@ if (!phantom.casperLoaded) {
phantom.exit(1);
}
var colorizer = require('colorizer');
var fs = require('fs');
var utils = require('utils');
var f = utils.format;
......@@ -37,6 +38,11 @@ function checkIncludeFile(include) {
// parse some options from cli
casper.options.verbose = casper.cli.get('direct') || false;
casper.options.logLevel = casper.cli.get('log-level') || "error";
if (casper.cli.get('no-colors')) {
var cls = 'Dummy';
casper.options.colorizerType = cls;
casper.colorizer = colorizer.create(cls);
}
// test paths are passed as args
if (casper.cli.args.length) {
......
var utils = require('utils'), t = casper.test, x = require('casper').selectXPath;
var utils = require('utils'),
t = casper.test,
x = require('casper').selectXPath;
t.comment('fileExt()');
(function() {
......