forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
27 lines (24 loc) · 1015 Bytes
/
test.js
File metadata and controls
27 lines (24 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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');
});
});
});