Skip to content

Commit fe12bd4

Browse files
committed
Add test for implementation result types
1 parent 4d8262b commit fe12bd4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test-d/implementation-result.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import test from '..';
2+
3+
test('return a promise-like', t => {
4+
return {
5+
then(resolve) {
6+
resolve?.();
7+
}
8+
};
9+
});
10+
11+
test('return a subscribable', t => {
12+
return {
13+
subscribe({complete}) {
14+
complete();
15+
}
16+
};
17+
});
18+
19+
test('return anything else', t => {
20+
return {
21+
foo: 'bar',
22+
subscribe() {},
23+
then() {}
24+
};
25+
});

0 commit comments

Comments
 (0)