UNPKG

geninq

Version:

A JavaScript version of the Linq library for Generators

34 lines (32 loc) 574 B
import { AIt, It } from "../test-utils"; import "./concat"; import "./array"; It("Appends an array", (s) => s.concat([4, 5, 6]).array(), [1, 2, 3, 4, 5, 6]); It( "Appends a generator", (s) => s .concat( (function* () { yield 4; yield 5; yield 6; })() ) .array(), [1, 2, 3, 4, 5, 6] ); AIt( "Appends a async generator", (s) => s .concat( (async function* () { yield 4; yield 5; yield 6; })() ) .array(), [1, 2, 3, 4, 5, 6] );