Commit b75fed22 b75fed2228d5db87918f5795f28f6e9d883b9fd7 by Nicolas Perriault

fixed #130 - --no-colors option is working with 'casper test' command

1 parent 98f0d052
......@@ -9,6 +9,7 @@ XXXX-XX-XX, v1.0.0
- fixed [#153](https://github.com/n1k0/casperjs/issues/153) - erroneous mouse event results when `event.preventDefault()` was used.
- fixed [#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.
- fixed [#119](https://github.com/n1k0/casperjs/issues/119) - `Casper.currentHTTPStatus` now defaults to `null` when resource are loaded using the `file://` protocol
- fixed [#130](https://github.com/n1k0/casperjs/issues/130) - added a `--no-colors` option to the `casper test` command to skip output coloration
- fixed [#197](https://github.com/n1k0/casperjs/pull/197) & [#240](https://github.com/n1k0/casperjs/pull/240/) - Added new tester methods:
* [`assertField`](http://casperjs.org/api.html#tester.assertField)
* [`assertSelectorHasText`](http://casperjs.org/api.html#tester.assertSelectorHasText)
......@@ -26,7 +27,6 @@ XXXX-XX-XX, v1.0.0
- fixed [#222](https://github.com/n1k0/casperjs/pull/222) & [#211](https://github.com/n1k0/casperjs/issues/211) - Change mouse event to include an X + Y value for click position
- fixed [#232](https://github.com/n1k0/casperjs/issues/232) - symlink resolution in the ruby version of the `casperjs` executable
- added [`ClientUtils.getDocumentHeight()`](http://casperjs.org/api.html#clientutils.getDocumentHeight)
- added a `--no-colors` option to the `casper test` command to skip output coloration
2012-06-26, v1.0.0-RC1
----------------------
......
......@@ -4,6 +4,7 @@ if (!phantom.casperLoaded) {
}
var fs = require('fs');
var colorizer = require('colorizer');
var utils = require('utils');
var f = utils.format;
var loadIncludes = ['includes', 'pre', 'post'];
......@@ -37,7 +38,7 @@ 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')) {
if (casper.cli.get('no-colors') === true) {
var cls = 'Dummy';
casper.options.colorizerType = cls;
casper.colorizer = colorizer.create(cls);
......