Skip to main content
Module

x/rambda/source/mergeAll.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import {mergeAll} from './mergeAll'
test('case 1', () => { const arr = [{a: 1}, {b: 2}, {c: 3}] const expectedResult = { a: 1, b: 2, c: 3, } expect(mergeAll(arr)).toEqual(expectedResult)})
test('case 2', () => { expect(mergeAll([{foo: 1}, {bar: 2}, {baz: 3}])).toEqual({ foo: 1, bar: 2, baz: 3, })})