Skip to content

Commit 3fd57a8

Browse files
committed
tweak test
1 parent 9680b06 commit 3fd57a8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/execution/__tests__/stream-test.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,14 @@ describe('Execute: stream directive', () => {
402402

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

405-
const results = [];
406-
if (isAsyncIterable(result)) {
407-
const asyncResults = await Promise.all([
408-
result.next(),
409-
result.next(),
410-
result.next(),
411-
result.next(),
412-
]);
413-
results.push(...asyncResults);
414-
}
405+
expect(isAsyncIterable(result)).to.equal(true);
406+
407+
const results = await Promise.all([
408+
result.next(),
409+
result.next(),
410+
result.next(),
411+
result.next(),
412+
]);
415413

416414
expect(results).to.deep.equal([
417415
{

0 commit comments

Comments
 (0)