deno.land / x / rambda@v9.1.1 / source / zipWith.spec.js

zipWith.spec.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { add } from './add.js'import { zipWith } from './zipWith.js'
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 ])})
rambda

Version Info

Tagged at
2 months ago