add 2 tests orderBy and palindrome
This commit is contained in:
@ -5,6 +5,9 @@ test('Testing orderBy', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof orderBy === 'function', 'orderBy is a Function');
|
||||
const users = [{ name: 'fred', age: 48 }, { name: 'barney', age: 36 }, { name: 'fred', age: 40 }];
|
||||
t.deepEqual(orderBy(users, ['name', 'age'], ['asc', 'desc']), [{name: 'barney', age: 36}, {name: 'fred', age: 48}, {name: 'fred', age: 40}], "Returns a sorted array of objects ordered by properties and orders.");
|
||||
t.deepEqual(orderBy(users, ['name', 'age']), [{name: 'barney', age: 36}, {name: 'fred', age: 40}, {name: 'fred', age: 48}], "Returns a sorted array of objects ordered by properties and orders.");
|
||||
//t.deepEqual(orderBy(args..), 'Expected');
|
||||
//t.equal(orderBy(args..), 'Expected');
|
||||
//t.false(orderBy(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,8 @@ test('Testing palindrome', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof palindrome === 'function', 'palindrome is a Function');
|
||||
t.equal(palindrome('taco cat'), true, "Given string is a palindrome");
|
||||
t.equal(palindrome('foobar'), false, "Given string is not a palindrome");
|
||||
//t.deepEqual(palindrome(args..), 'Expected');
|
||||
//t.equal(palindrome(args..), 'Expected');
|
||||
//t.false(palindrome(args..), 'Expected');
|
||||
|
||||
Reference in New Issue
Block a user