Skip to content

Commit a6efb92

Browse files
committed
Test key is passed into iteratee for mapValues
utils/composeStores uses the key second argument for the iteratee so updated the test to make sure it isn't missing.
1 parent 1fbb490 commit a6efb92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/utils/mapValues.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import mapValues from '../../src/utils/mapValues';
44
describe('Utils', () => {
55
describe('mapValues', () => {
66
it('should return object with mapped values', () => {
7-
const test = { 'a': 1, 'b': 2 };
8-
expect(mapValues(test, val => val * 3)).toEqual({ 'a': 3, 'b': 6 });
7+
const test = { 'a': 'c', 'b': 'd' };
8+
expect(mapValues(test, (val, key) => val + key)).toEqual({ 'a': 'ca', 'b': 'db' });
99
});
1010
});
1111
});

0 commit comments

Comments
 (0)