added unit testing, and started implementing unit tests...phew

This commit is contained in:
Josh Burman
2019-03-12 22:28:02 -04:00
parent 74aad4a957
commit e8c2539f1b
3489 changed files with 464813 additions and 88 deletions

27
node_modules/kuler/test.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
const { it, describe } = require('mocha');
const assume = require('assume');
const kuler = require('./');
describe('kuler', function () {
it('renders colors in the terminal', function () {
console.log(' VISUAL INSPECTION');
console.log(' '+ kuler('red').style('red'));
console.log(' '+ kuler('black').style('#000'));
console.log(' '+ kuler('white').style('#FFFFFF'));
console.log(' '+ kuler('lime').style('AAFF5B'));
console.log(' '+ kuler('violet').style('violetred 1'));
console.log(' '+ kuler('purple').style('purple'));
console.log(' '+ kuler('purple').style('purple'), 'correctly reset to normal color');
console.log(' '+ kuler('green', 'green'));
});
it('supports color names and hex values', function () {
assume(kuler('black', 'black')).equals(kuler('black', '#000'));
})
describe('#style', function () {
it('has a style method', function () {
assume(kuler('what').style).is.a('function');
});
});
});