From 390b10f3a56dbab6c2e123c4f402eba91d1882fb Mon Sep 17 00:00:00 2001 From: Nikita Anisimov Date: Fri, 13 Oct 2023 17:35:57 +0400 Subject: [PATCH] Add a test for .filter(Boolean) on array, containing void --- src/tests/filter-boolean.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tests/filter-boolean.ts b/src/tests/filter-boolean.ts index 4899b06..6dbb6e0 100644 --- a/src/tests/filter-boolean.ts +++ b/src/tests/filter-boolean.ts @@ -38,3 +38,11 @@ doNotExecute(() => { type tests = [Expect>]; }); + +doNotExecute(() => { + const arr = [(x?: unknown) => 1, () => {}].map((fn) => fn()); + + const result = arr.filter(Boolean); + + type tests = [Expect>]; +});