update luhnCheck example, add 2 tests, luhnCheck & mapObject

This commit is contained in:
Stefan Feješ
2018-01-10 14:48:59 +01:00
parent 51260a85a8
commit 72b4a0d12a
3 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,8 @@ test('Testing mapObject', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof mapObject === 'function', 'mapObject is a Function');
const squareIt = arr => mapObject(arr, a => a * a);
t.deepEqual(squareIt([1, 2, 3]), { 1: 1, 2: 4, 3: 9 }, "Maps the values of an array to an object using a function");
//t.deepEqual(mapObject(args..), 'Expected');
//t.equal(mapObject(args..), 'Expected');
//t.false(mapObject(args..), 'Expected');