ran npm run tdd
This commit is contained in:
18
test/colorize/colorize.js
Normal file
18
test/colorize/colorize.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = colorize = (...args) => ({
|
||||
black: `\x1b[30m${args.join(' ')}`,
|
||||
red: `\x1b[31m${args.join(' ')}`,
|
||||
green: `\x1b[32m${args.join(' ')}`,
|
||||
yellow: `\x1b[33m${args.join(' ')}`,
|
||||
blue: `\x1b[34m${args.join(' ')}`,
|
||||
magenta: `\x1b[35m${args.join(' ')}`,
|
||||
cyan: `\x1b[36m${args.join(' ')}`,
|
||||
white: `\x1b[37m${args.join(' ')}`,
|
||||
bgBlack: `\x1b[40m${args.join(' ')}\x1b[0m`,
|
||||
bgRed: `\x1b[41m${args.join(' ')}\x1b[0m`,
|
||||
bgGreen: `\x1b[42m${args.join(' ')}\x1b[0m`,
|
||||
bgYellow: `\x1b[43m${args.join(' ')}\x1b[0m`,
|
||||
bgBlue: `\x1b[44m${args.join(' ')}\x1b[0m`,
|
||||
bgMagenta: `\x1b[45m${args.join(' ')}\x1b[0m`,
|
||||
bgCyan: `\x1b[46m${args.join(' ')}\x1b[0m`,
|
||||
bgWhite: `\x1b[47m${args.join(' ')}\x1b[0m`
|
||||
});
|
||||
13
test/colorize/colorize.test.js
Normal file
13
test/colorize/colorize.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const colorize = require('./colorize.js');
|
||||
|
||||
test('Testing colorize', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof colorize === 'function', 'colorize is a Function');
|
||||
//t.deepEqual(colorize(args..), 'Expected');
|
||||
//t.equal(colorize(args..), 'Expected');
|
||||
//t.false(colorize(args..), 'Expected');
|
||||
//t.throws(colorize(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user