mirror of
https://github.com/zhigang1992/redux.git
synced 2026-06-17 05:29:52 +08:00
17 lines
319 B
JavaScript
17 lines
319 B
JavaScript
import expect from 'expect'
|
|
import mapValues from '../../src/utils/mapValues'
|
|
|
|
describe('mapValues', () => {
|
|
it('returns object with mapped values', () => {
|
|
const test = {
|
|
a: 'c',
|
|
b: 'd'
|
|
}
|
|
expect(mapValues(test, (val, key) => val + key)).toEqual({
|
|
a: 'ca',
|
|
b: 'db'
|
|
})
|
|
})
|
|
})
|
|
|