UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

20 lines (19 loc) 395 B
import { merge } from './merge'; var a = { x: 1, y: 2, }; var b = { y: 10, z: 2, }; describe('data first', function () { test('should merge', function () { expect(merge(a, b)).toEqual({ x: 1, y: 10, z: 2 }); }); }); describe('data last', function () { test('should merge', function () { expect(merge(b)(a)).toEqual({ x: 1, y: 10, z: 2 }); }); });