Skip to content

Commit

Permalink
Use native "Symbol.asyncIterator" in tests (#2363)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jan 20, 2020
1 parent fe05d1b commit c90c9a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subscription/__tests__/eventEmitterAsyncIterator.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow strict

import type EventEmitter from 'events';
import { $$asyncIterator } from 'iterall';

/**
* Create an AsyncIterator from an EventEmitter. Useful for mocking a
Expand Down Expand Up @@ -60,7 +59,8 @@ export default function eventEmitterAsyncIterator(
emptyQueue();
return Promise.reject(error);
},
[$$asyncIterator]() {
// $FlowFixMe Blocked by https://github.com/facebook/flow/issues/3258
[Symbol.asyncIterator]() {
return this;
},
}: any);
Expand Down

0 comments on commit c90c9a3

Please sign in to comment.