UNPKG

spica

Version:

Supervisor, Coroutine, Channel, select, AtomicPromise, Cancellation, Cache, List, Queue, Stack, and some utils.

44 lines (37 loc) 798 B
import { nat } from '../../../sequence.test'; describe('Unit: lib/monad/sequence/member/fmap', () => { describe('fmap', () => { it('0', () => { assert.deepStrictEqual( nat .fmap(String) .take(0) .extract(), [].map(String)); }); it('1', () => { assert.deepStrictEqual( nat .fmap(String) .take(1) .extract(), [0].map(String)); }); it('2', () => { assert.deepStrictEqual( nat .fmap(String) .take(2) .extract(), [0, 1].map(String)); }); it('3', () => { assert.deepStrictEqual( nat .fmap(String) .take(3) .extract(), [0, 1, 2].map(String)); }); }); });