Skip to content

Commit

Permalink
Add test for implementation result types
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Jul 10, 2021
1 parent 4d8262b commit fe12bd4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test-d/implementation-result.ts
@@ -0,0 +1,25 @@
import test from '..';

test('return a promise-like', t => {
return {
then(resolve) {
resolve?.();
}
};
});

test('return a subscribable', t => {
return {
subscribe({complete}) {
complete();
}
};
});

test('return anything else', t => {
return {
foo: 'bar',
subscribe() {},
then() {}
};
});

0 comments on commit fe12bd4

Please sign in to comment.