From 8d424d46fa599a069a801301e34f98e44b99e3d9 Mon Sep 17 00:00:00 2001 From: Chris Sperry Date: Thu, 25 Feb 2021 22:09:27 +0000 Subject: [PATCH] test: add more tests to ensure getImpureIterable works as expected --- test/ts-iterable-functions.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ts-iterable-functions.test.ts b/test/ts-iterable-functions.test.ts index e09ad64..576e0f8 100644 --- a/test/ts-iterable-functions.test.ts +++ b/test/ts-iterable-functions.test.ts @@ -66,6 +66,7 @@ import { _sequenceEqual, _reduce, toIterable, + _first, } from '../src/ts-iterable-functions' import { Date } from './Date' import { deepEqualityComparer } from 'ts-equality-comparer' @@ -1218,6 +1219,8 @@ describe('blinq test', () => { const iterable = getImpureIterable() expect([...iterable]).toEqual([0, 1, 2]) expect([...iterable]).toEqual([1, 2, 3]) + expect(_first(iterable)).toBe(2) + expect(_first(iterable)).toBe(3) }) }) function getImpureIterable() {