Skip to content

Commit b029ef8

Browse files
mapAsyncIterator: simplify test case (#3098)
1 parent a0670bc commit b029ef8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/subscription/__tests__/mapAsyncIterator-test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ describe('mapAsyncIterator', () => {
7373
yield 3;
7474
}
7575

76-
// Flow test: this is *not* AsyncIterator<Promise<number>>
77-
const doubles: AsyncIterator<number> = mapAsyncIterator(
78-
source(),
79-
async (x) => (await x) + x,
80-
);
76+
const doubles = mapAsyncIterator(source(), (x) => Promise.resolve(x + x));
8177

8278
expect(await doubles.next()).to.deep.equal({ value: 2, done: false });
8379
expect(await doubles.next()).to.deep.equal({ value: 4, done: false });

0 commit comments

Comments
 (0)