Skip to content

Commit

Permalink
tweak test
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Mar 21, 2021
1 parent 9680b06 commit 3fd57a8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/execution/__tests__/stream-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,14 @@ describe('Execute: stream directive', () => {

const result = await execute({ schema, document, rootValue: {} });

const results = [];
if (isAsyncIterable(result)) {
const asyncResults = await Promise.all([
result.next(),
result.next(),
result.next(),
result.next(),
]);
results.push(...asyncResults);
}
expect(isAsyncIterable(result)).to.equal(true);

const results = await Promise.all([
result.next(),
result.next(),
result.next(),
result.next(),
]);

expect(results).to.deep.equal([
{
Expand Down

0 comments on commit 3fd57a8

Please sign in to comment.