Skip to main content
Module

x/rambda/source/zipWith.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import {add} from './add'import {zipWith} from './zipWith'
const list1 = [1, 2, 3]const list2 = [10, 20, 30, 40]const list3 = [100, 200]
test('when second list is shorter', () => { const result = zipWith(add, list1, list3) expect(result).toEqual([101, 202])})
test('when second list is longer', () => { const result = zipWith(add, list1, list2) expect(result).toEqual([11, 22, 33])})