|
1 | 1 | // @flow strict
|
2 | 2 |
|
3 |
| -import { forAwaitEach } from 'iterall'; |
4 | 3 | import { expect } from 'chai';
|
5 | 4 | import { describe, it } from 'mocha';
|
6 | 5 |
|
@@ -89,9 +88,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
89 | 88 |
|
90 | 89 | /* istanbul ignore else */
|
91 | 90 | if (patchesIterable) {
|
92 |
| - await forAwaitEach(patchesIterable, patch => { |
| 91 | + for await (const patch of patchesIterable) { |
93 | 92 | patches.push(patch);
|
94 |
| - }); |
| 93 | + } |
95 | 94 | }
|
96 | 95 |
|
97 | 96 | expect(patches).to.have.lengthOf(1);
|
@@ -126,9 +125,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
126 | 125 |
|
127 | 126 | /* istanbul ignore else */
|
128 | 127 | if (patchesIterable) {
|
129 |
| - await forAwaitEach(patchesIterable, patch => { |
| 128 | + for await (const patch of patchesIterable) { |
130 | 129 | patches.push(patch);
|
131 |
| - }); |
| 130 | + } |
132 | 131 | }
|
133 | 132 |
|
134 | 133 | expect(patches).to.have.lengthOf(1);
|
@@ -181,9 +180,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
181 | 180 |
|
182 | 181 | /* istanbul ignore else */
|
183 | 182 | if (patchesIterable) {
|
184 |
| - await forAwaitEach(patchesIterable, patch => { |
| 183 | + for await (const patch of patchesIterable) { |
185 | 184 | patches.push(patch);
|
186 |
| - }); |
| 185 | + } |
187 | 186 | }
|
188 | 187 |
|
189 | 188 | expect(patches).to.have.lengthOf(2);
|
@@ -240,9 +239,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
240 | 239 |
|
241 | 240 | /* istanbul ignore else */
|
242 | 241 | if (patchesIterable) {
|
243 |
| - await forAwaitEach(patchesIterable, patch => { |
| 242 | + for await (const patch of patchesIterable) { |
244 | 243 | patches.push(patch);
|
245 |
| - }); |
| 244 | + } |
246 | 245 | }
|
247 | 246 | expect(patches).to.have.lengthOf(1);
|
248 | 247 | expect(patches[0]).to.deep.equal({
|
@@ -331,9 +330,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
331 | 330 |
|
332 | 331 | /* istanbul ignore else */
|
333 | 332 | if (patchesIterable) {
|
334 |
| - await forAwaitEach(patchesIterable, patch => { |
| 333 | + for await (const patch of patchesIterable) { |
335 | 334 | patches.push(patch);
|
336 |
| - }); |
| 335 | + } |
337 | 336 | }
|
338 | 337 |
|
339 | 338 | expect(patches).to.have.lengthOf(2);
|
@@ -417,9 +416,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
417 | 416 |
|
418 | 417 | /* istanbul ignore else */
|
419 | 418 | if (patchesIterable) {
|
420 |
| - await forAwaitEach(patchesIterable, patch => { |
| 419 | + for await (const patch of patchesIterable) { |
421 | 420 | patches.push(patch);
|
422 |
| - }); |
| 421 | + } |
423 | 422 | }
|
424 | 423 | expect(patches).to.have.lengthOf(1);
|
425 | 424 | expect(patches[0]).to.deep.equal({
|
@@ -468,9 +467,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
468 | 467 |
|
469 | 468 | /* istanbul ignore else */
|
470 | 469 | if (patchesIterable) {
|
471 |
| - await forAwaitEach(patchesIterable, patch => { |
| 470 | + for await (const patch of patchesIterable) { |
472 | 471 | patches.push(patch);
|
473 |
| - }); |
| 472 | + } |
474 | 473 | }
|
475 | 474 | expect(patches).to.have.lengthOf(1);
|
476 | 475 | expect(patches[0]).to.deep.equal({
|
@@ -554,9 +553,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
554 | 553 |
|
555 | 554 | /* istanbul ignore else */
|
556 | 555 | if (patchesIterable) {
|
557 |
| - await forAwaitEach(patchesIterable, patch => { |
| 556 | + for await (const patch of patchesIterable) { |
558 | 557 | patches.push(patch);
|
559 |
| - }); |
| 558 | + } |
560 | 559 | }
|
561 | 560 | expect(patches).to.have.lengthOf(1);
|
562 | 561 | expect(patches[0]).to.deep.equal({
|
@@ -600,9 +599,9 @@ describe('Star Wars Query Deferred Tests', () => {
|
600 | 599 |
|
601 | 600 | /* istanbul ignore else */
|
602 | 601 | if (patchesIterable) {
|
603 |
| - await forAwaitEach(patchesIterable, patch => { |
| 602 | + for await (const patch of patchesIterable) { |
604 | 603 | patches.push(patch);
|
605 |
| - }); |
| 604 | + } |
606 | 605 | }
|
607 | 606 | expect(patches).to.have.lengthOf(1);
|
608 | 607 | expect(patches[0]).to.deep.equal({
|
|
0 commit comments