Skip to content

Commit

Permalink
mapAsyncIterator: simplify test case (#3098)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed May 16, 2021
1 parent a0670bc commit b029ef8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/subscription/__tests__/mapAsyncIterator-test.js
Expand Up @@ -73,11 +73,7 @@ describe('mapAsyncIterator', () => {
yield 3;
}

// Flow test: this is *not* AsyncIterator<Promise<number>>
const doubles: AsyncIterator<number> = 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 });
Expand Down

0 comments on commit b029ef8

Please sign in to comment.