fix initial test, add 2 tests, hextoRGB & indexOfAll
This commit is contained in:
@ -5,6 +5,9 @@ test('Testing hexToRGB', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof hexToRGB === 'function', 'hexToRGB is a Function');
|
||||
t.equal(hexToRGB('#27ae60ff'), 'rgba(39, 174, 96, 255)', "Converts a color code to a rgb() or rgba() string");
|
||||
t.equal(hexToRGB('27ae60'), 'rgb(39, 174, 96)', "Converts a color code to a rgb() or rgba() string");
|
||||
t.equal(hexToRGB('#fff'), 'rgb(255, 255, 255)', "Converts a color code to a rgb() or rgba() string");
|
||||
//t.deepEqual(hexToRGB(args..), 'Expected');
|
||||
//t.equal(hexToRGB(args..), 'Expected');
|
||||
//t.false(hexToRGB(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,8 @@ test('Testing indexOfAll', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof indexOfAll === 'function', 'indexOfAll is a Function');
|
||||
t.deepEqual(indexOfAll([1, 2, 3, 1, 2, 3], 1), [0,3], "Returns all indices of val in an array");
|
||||
t.deepEqual(indexOfAll([1, 2, 3], 4), [], "Returns all indices of val in an array");
|
||||
//t.deepEqual(indexOfAll(args..), 'Expected');
|
||||
//t.equal(indexOfAll(args..), 'Expected');
|
||||
//t.false(indexOfAll(args..), 'Expected');
|
||||
|
||||
@ -5,7 +5,7 @@ test('Testing initial', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof initial === 'function', 'initial is a Function');
|
||||
t.deepEqual(initial([1, 2, 3]), [2, 3], "Returns all the elements of an array except the last one");
|
||||
t.deepEqual(initial([1, 2, 3]), [1, 2], "Returns all the elements of an array except the last one");
|
||||
//t.deepEqual(initial(args..), 'Expected');
|
||||
//t.equal(initial(args..), 'Expected');
|
||||
//t.false(initial(args..), 'Expected');
|
||||
|
||||
Reference in New Issue
Block a user