Alias grey to gray. Fixes #3

This commit is contained in:
Sindre Sorhus 2013-08-29 16:14:18 +02:00
parent f7514e8055
commit 38efc4600b
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,8 @@
var ansi = require('ansi-styles'); var ansi = require('ansi-styles');
var defineProps = Object.defineProperties; var defineProps = Object.defineProperties;
ansi.grey = ansi.gray;
var styles = (function () { var styles = (function () {
var ret = {}; var ret = {};

View file

@ -25,6 +25,10 @@ describe('chalk', function () {
it('should reset all styles with `.reset()`', function () { it('should reset all styles with `.reset()`', function () {
assert.equal(chalk.reset(chalk.red.bgGreen.underline('foo') + 'foo'), '\x1b[0m\x1b[4m\x1b[42m\x1b[31mfoo\x1b[39m\x1b[49m\x1b[24mfoo\x1b[0m'); assert.equal(chalk.reset(chalk.red.bgGreen.underline('foo') + 'foo'), '\x1b[0m\x1b[4m\x1b[42m\x1b[31mfoo\x1b[39m\x1b[49m\x1b[24mfoo\x1b[0m');
}); });
it('should alias gray to grey', function () {
assert.equal(chalk.grey('foo'), '\x1b[90mfoo\x1b[39m');
});
}); });
describe('chalk.enabled', function () { describe('chalk.enabled', function () {