From 94dd6dea66811e964656156db40ac4daed669a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mladen=20Jakovljevi=C4=87?= Date: Fri, 21 Oct 2022 10:48:56 +0200 Subject: [PATCH] test(share): add test that verifies Promise support --- spec-dtslint/operators/share-spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec-dtslint/operators/share-spec.ts b/spec-dtslint/operators/share-spec.ts index 560941195b..3587116419 100644 --- a/spec-dtslint/operators/share-spec.ts +++ b/spec-dtslint/operators/share-spec.ts @@ -8,3 +8,8 @@ it('should infer correctly', () => { it('should enforce types', () => { const o = of('foo', 'bar', 'baz').pipe(share('abc')); // $ExpectError }); + +it('should support Promises', () => { + const factory = () => Promise.resolve(); + of(1, 2, 3).pipe(share({ resetOnError: factory, resetOnComplete: factory, resetOnRefCountZero: factory })); // $ExpectType Observable +});