Permalink
Browse files

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

  • Loading branch information...
1 parent 6f4899a commit 1391561b5a3cf4bcfb3d4cdecd62843c813cbc83 @n1k0 n1k0 committed Jul 18, 2012
Showing with 10 additions and 1 deletion.
  1. +1 −0 CHANGELOG.md
  2. +6 −0 tests/run.js
  3. +3 −1 tests/suites/utils.js
View
@@ -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
----------------------
View
@@ -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) {
View
@@ -1,4 +1,6 @@
-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() {

0 comments on commit 1391561

Please sign in to comment.