Skip to content

Commit c3953aa

Browse files
committed
test: add each test case
1 parent b240390 commit c3953aa

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fxts/core",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "",
55
"type": "module",
66
"main": "dist/cjs/index.js",

type-check/each.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import * as Test from "../src/types/Test";
2-
import { each, pipe, toAsync } from "../src";
2+
import { each, pipe, take, toAsync } from "../src";
33

44
const { checks, check } = Test;
55

66
const res1 = each(console.log, [1, 2, 3]);
77
const res2 = pipe([1, 2, 3], each(console.log));
8-
const res3 = pipe([1, 2, 3], toAsync, each(console.log));
8+
const res3 = pipe([1, 2, 3], take(1), each(console.log));
9+
const res4 = pipe([1, 2, 3], toAsync, each(console.log));
910

1011
checks([
1112
check<typeof res1, void, Test.Pass>(),
1213
check<typeof res2, void, Test.Pass>(),
13-
check<typeof res3, Promise<void>, Test.Pass>(),
14+
check<typeof res3, void, Test.Pass>(),
15+
check<typeof res4, Promise<void>, Test.Pass>(),
1416
]);

0 commit comments

Comments
 (0)