Blame SOURCES/test.js

100d8d
/*global describe */
100d8d
'use strict';
100d8d
var assert = require('assert');
100d8d
var ansi = require('./ansi-styles');
100d8d
100d8d
// generates the screenshot
100d8d
Object.keys(ansi).forEach(function (el) {
100d8d
	var style = ansi[el].open;
100d8d
100d8d
	if (el === 'reset') {
100d8d
		return;
100d8d
	}
100d8d
100d8d
	if (/^bg[^B]/.test(el)) {
100d8d
		style = ansi.black.open + style;
100d8d
	}
100d8d
100d8d
	process.stdout.write(style + el + ansi.reset.open + ansi.reset.close + ' ');
100d8d
});
100d8d
100d8d
describe('ansiStyles()', function () {
100d8d
	it('should return ANSI escape codes', function () {
100d8d
		assert.equal(ansi.green.open, '\x1b[32m');
100d8d
		assert.equal(ansi.bgGreen.open, '\x1b[42m');
100d8d
		assert.equal(ansi.green.close, '\x1b[39m');
100d8d
	});
100d8d
});