Skip to content

Commit c1376e3

Browse files
Enable Flow on more test files (#1806)
1 parent 1321858 commit c1376e3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/subscription/__tests__/asyncIteratorReject-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @noflow
7+
* @flow strict
88
*/
99

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

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

3839
expect(await iter.next()).to.deep.equal({ done: true, value: undefined });

src/subscription/__tests__/eventEmitterAsyncIterator-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @noflow
7+
* @flow strict
88
*/
99

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

5151
// Terminate emitter
52+
// $FlowFixMe
5253
await iterator.return();
5354

5455
// Publish is not caught after terminate

src/subscription/__tests__/subscribe-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ describe('Subscription Publish Phase', () => {
926926
}
927927

928928
expect(expectedError).to.be.instanceof(Error);
929-
expect(expectedError.message).to.equal('test error');
929+
expect(expectedError).to.have.property('message', 'test error');
930930

931931
const payload2 = await subscription.next();
932932
expect(payload2).to.deep.equal({

0 commit comments

Comments
 (0)