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

repeat.spec.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { repeat } from './repeat.js'
test('repeat', () => { expect(repeat('')(3)).toEqual([ '', '', '' ]) expect(repeat('foo', 3)).toEqual([ 'foo', 'foo', 'foo' ])
const obj = {} const arr = repeat(obj, 3)
expect(arr).toEqual([ {}, {}, {} ])
expect(arr[ 0 ] === arr[ 1 ]).toBeTrue()})
rambda

Version Info

Tagged at
2 months ago