Skip to content

Commit

Permalink
Add test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 30, 2018
1 parent 33d27ac commit c90fcb5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions test/colors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
var toxic = require('../toxic')
var color = require('../safe');
require('../toxic')

var _styles = require('../lib/styles-name')
var colors = _styles.colors;
var styles = _styles.styles;

console.log('\n')

styles.forEach(function (key) {
process.stdout.write(" " + key[key]);
});

var str = ' "\\n " + ';
colors.forEach(function (key) {
str += 'color.' + key + '(" ' + key + ' ") +';
});
str += ' "\\n " + ';
colors.forEach(function (key) {
str += 'color.' + key + '_bt(" ' + key + '_bt ") +';
});

console.log(eval(str.replace(/\+$/, '')))

colors.forEach(function (key) {
process.stdout.write(" " + eval('" ' + key + "_bbt" + ' ".' + key + "_bbt"))
});
console.log();
colors.forEach(function (key) {
process.stdout.write(" " + eval('" ' + key + "_b " + ' ".' + key + "_b"))
});
console.log();

0 comments on commit c90fcb5

Please sign in to comment.