UNPKG

prray

Version:

'Promisified' Array, comes with async method supports(such as mapAsync). And it is compatible with normal array.

16 lines (13 loc) 418 B
import test from 'ava' import { prray } from '../src/prray' import { toPrrayPromise } from './test-utils' test('prray toLocaleString', async t => { const arr = [1, 2, 3] const prr = prray(arr) t.is(prr.toLocaleString(), arr.toLocaleString()) }) test('prraypromise toLocaleString', async t => { const arr = [1, 2, 3] const pp = toPrrayPromise(arr) t.is(await pp.toLocaleString(), arr.toLocaleString()) })