Skip to content

Commit 94dd6de

Browse files
test(share): add test that verifies Promise support
1 parent 171abf0 commit 94dd6de

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

spec-dtslint/operators/share-spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ it('should infer correctly', () => {
88
it('should enforce types', () => {
99
const o = of('foo', 'bar', 'baz').pipe(share('abc')); // $ExpectError
1010
});
11+
12+
it('should support Promises', () => {
13+
const factory = () => Promise.resolve();
14+
of(1, 2, 3).pipe(share({ resetOnError: factory, resetOnComplete: factory, resetOnRefCountZero: factory })); // $ExpectType Observable<number>
15+
});

0 commit comments

Comments
 (0)