update test for random hexColorCode
This commit is contained in:
@ -7,6 +7,8 @@ test('Testing randomHexColorCode', (t) => {
|
||||
t.true(typeof randomHexColorCode === 'function', 'randomHexColorCode is a Function');
|
||||
//t.deepEqual(randomHexColorCode(args..), 'Expected');
|
||||
t.equal(randomHexColorCode().length, 7);
|
||||
t.true(randomHexColorCode().startsWith('#'),'The color code starts with "#"');
|
||||
t.true(randomHexColorCode().slice(1).match(/[^0123456789abcdef]/i) === null)
|
||||
//t.false(randomHexColorCode(args..), 'Expected');
|
||||
//t.throws(randomHexColorCode(args..), 'Expected');
|
||||
t.end();
|
||||
|
||||
Reference in New Issue
Block a user