From 451b2beebb01cba40a4d64a1fe52202bc64ad2a1 Mon Sep 17 00:00:00 2001 From: Okiki Date: Fri, 23 Aug 2024 09:18:18 +0000 Subject: [PATCH] chore: rename split_mod.ts to split_test.ts Signed-off-by: Okiki --- split_mod.ts => split_test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename split_mod.ts => split_test.ts (89%) diff --git a/split_mod.ts b/split_test.ts similarity index 89% rename from split_mod.ts rename to split_test.ts index 92fc242..bdd4945 100644 --- a/split_mod.ts +++ b/split_test.ts @@ -11,7 +11,6 @@ test("all")("split should correctly split valid values and errors", async () => yield new Error("This is an error"); yield 10; throw new Error("Something went wrong"); - return 5 } const [resolved, errored] = split(sourceIterator()); @@ -27,7 +26,7 @@ test("all")("split should correctly split valid values and errors", async () => }); // Test for splitBy function with predicate -test("all")("splitBy should correctly split based on predicate", async () => { +test.only("deno")("splitBy should correctly split based on predicate", async () => { async function* sourceIterator() { yield 1; yield 2; @@ -44,6 +43,14 @@ test("all")("splitBy should correctly split based on predicate", async () => { // Collect odd values const oddValues = await Array.fromAsync(odds); + console.log({ + evenValues, + oddValues, + + new_evenValues: await Array.fromAsync(evens), + new_oddValues: await Array.fromAsync(odds), + }) + expect(evenValues).toEqual([2, 4]); expect(oddValues).toEqual([1, 3]); }); -- knotmirror 0.0.1