1- 'use strict' ;
2- const { expect } = require ( 'chai' ) ;
3- const { filterForCommands } = require ( '../shared' ) ;
4- const {
5- promiseWithResolvers,
6- MongoCursorExhaustedError,
1+ import { expect } from 'chai' ;
2+
3+ import {
74 CursorTimeoutContext ,
8- TimeoutContext,
9- MongoAPIError
10- } = require ( '../../mongodb' ) ;
5+ MongoAPIError ,
6+ MongoCursorExhaustedError ,
7+ promiseWithResolvers ,
8+ TimeoutContext
9+ } from '../../mongodb' ;
10+ import { filterForCommands } from '../shared' ;
1111
1212describe ( 'Find Cursor' , function ( ) {
1313 let client ;
@@ -437,7 +437,7 @@ describe('Find Cursor', function () {
437437 } ) ;
438438
439439 await cursor . next ( ) ;
440- // eslint-disable-next-line no-unused-vars
440+
441441 for await ( const _ of cursor ) {
442442 /* empty */
443443 }
@@ -543,7 +543,7 @@ describe('Find Cursor', function () {
543543 await promise ;
544544
545545 let count = 0 ;
546- // eslint-disable-next-line no-unused-vars
546+
547547 for await ( const _ of cursor ) {
548548 count ++ ;
549549 }
@@ -587,7 +587,7 @@ describe('Find Cursor', function () {
587587 cursor = collection . find ( { } ) ;
588588
589589 await cursor . toArray ( ) ;
590- // eslint-disable-next-line no-unused-vars
590+
591591 for await ( const _ of cursor ) {
592592 expect . fail ( 'should not iterate' ) ;
593593 }
@@ -633,7 +633,7 @@ describe('Find Cursor', function () {
633633 } ) ;
634634
635635 await cursor . next ( ) ;
636- // eslint-disable-next-line no-unused-vars
636+
637637 for await ( const _ of cursor ) {
638638 /* empty */
639639 }
@@ -647,7 +647,6 @@ describe('Find Cursor', function () {
647647 it ( 'throws a MongoCursorExhaustedError' , async function ( ) {
648648 cursor = collection . find ( { } , { batchSize : 1 } ) ;
649649
650- // eslint-disable-next-line no-unused-vars
651650 for await ( const _ of cursor ) {
652651 /* empty */
653652 break ;
@@ -715,7 +714,7 @@ describe('Find Cursor', function () {
715714 cursor = collection . find ( { } , { batchSize : 1 } ) ;
716715
717716 await cursor . toArray ( ) ;
718- // eslint-disable-next-line no-unused-vars
717+
719718 for await ( const _ of cursor ) {
720719 expect . fail ( 'should not iterate' ) ;
721720 }
0 commit comments