typo at objectToPairs & add test

This commit is contained in:
Stefan Feješ
2018-01-10 14:27:06 +01:00
parent adeec058c9
commit 9fd2ec582f
2 changed files with 2 additions and 1 deletions

View File

@ -9,5 +9,5 @@ const objectToPairs = obj => Object.keys(obj).map(k => [k, obj[k]]);
``` ```
```js ```js
objectToPairs({ a: 1, b: 2 }); // [['a',1],['b',2]]) objectToPairs({ a: 1, b: 2 }); // [['a',1],['b',2]]
``` ```

View File

@ -5,6 +5,7 @@ test('Testing objectToPairs', (t) => {
//For more information on all the methods supported by tape //For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape //Please go to https://github.com/substack/tape
t.true(typeof objectToPairs === 'function', 'objectToPairs is a Function'); t.true(typeof objectToPairs === 'function', 'objectToPairs is a Function');
t.deepEqual(objectToPairs({ a: 1, b: 2 }), [['a',1],['b',2]], "Creates an array of key-value pair arrays from an object.");
//t.deepEqual(objectToPairs(args..), 'Expected'); //t.deepEqual(objectToPairs(args..), 'Expected');
//t.equal(objectToPairs(args..), 'Expected'); //t.equal(objectToPairs(args..), 'Expected');
//t.false(objectToPairs(args..), 'Expected'); //t.false(objectToPairs(args..), 'Expected');