Skip to content

Commit

Permalink
chore: test with join
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood committed Dec 1, 2023
1 parent 95566bc commit 5497e97
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/strings/split.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { describe, expect, test } from "vitest";

import { fromIterable } from "../../src/fromIterable";
import { pipeline } from "../../src/pipeline";
import { join } from "../../src/strings/join";
import { split } from "../../src/strings/split";
import { toArray } from "../../src/toArray";

Expand All @@ -25,4 +26,17 @@ describe("split", () => {

expect(destinationArray).toEqual(["1", "2", "3"]);
});

test("works well with join", async () => {
const destinationArray = [];

await pipeline(
fromIterable(["1-2-3"]),
split('-'),
join('|'),
toArray(destinationArray),
)

expect(destinationArray).toEqual(["1|2|3"]);
})
});

0 comments on commit 5497e97

Please sign in to comment.