From d0f7c66df262b3b22e3f9e39c1be4f0c88e264b3 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Sun, 16 May 2021 14:22:03 +0300 Subject: [PATCH] mapAsyncIterator: simplify test case --- src/subscription/__tests__/mapAsyncIterator-test.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/subscription/__tests__/mapAsyncIterator-test.js b/src/subscription/__tests__/mapAsyncIterator-test.js index b1ff21c1c8..d030521050 100644 --- a/src/subscription/__tests__/mapAsyncIterator-test.js +++ b/src/subscription/__tests__/mapAsyncIterator-test.js @@ -73,11 +73,7 @@ describe('mapAsyncIterator', () => { yield 3; } - // Flow test: this is *not* AsyncIterator> - const doubles: AsyncIterator = mapAsyncIterator( - source(), - async (x) => (await x) + x, - ); + const doubles = mapAsyncIterator(source(), (x) => Promise.resolve(x + x)); expect(await doubles.next()).to.deep.equal({ value: 2, done: false }); expect(await doubles.next()).to.deep.equal({ value: 4, done: false });