Skip to content

Commit

Permalink
Enable Flow on more test files (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Mar 29, 2019
1 parent 1321858 commit c1376e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/subscription/__tests__/asyncIteratorReject-test.js
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand Down Expand Up @@ -33,6 +33,7 @@ describe('asyncIteratorReject', () => {
const iter = asyncIteratorReject(error);

// Close iterator
// $FlowFixMe
expect(await iter.return()).to.deep.equal({ done: true, value: undefined });

expect(await iter.next()).to.deep.equal({ done: true, value: undefined });
Expand Down
3 changes: 2 additions & 1 deletion src/subscription/__tests__/eventEmitterAsyncIterator-test.js
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @flow strict
*/

import { expect } from 'chai';
Expand Down Expand Up @@ -49,6 +49,7 @@ describe('eventEmitterAsyncIterator', () => {
const i5 = iterator.next().then(x => x);

// Terminate emitter
// $FlowFixMe
await iterator.return();

// Publish is not caught after terminate
Expand Down
2 changes: 1 addition & 1 deletion src/subscription/__tests__/subscribe-test.js
Expand Up @@ -926,7 +926,7 @@ describe('Subscription Publish Phase', () => {
}

expect(expectedError).to.be.instanceof(Error);
expect(expectedError.message).to.equal('test error');
expect(expectedError).to.have.property('message', 'test error');

const payload2 = await subscription.next();
expect(payload2).to.deep.equal({
Expand Down

0 comments on commit c1376e3

Please sign in to comment.