Skip to content

Commit 0087f55

Browse files
committed
lint fix
1 parent 084f513 commit 0087f55

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

test/integration/change-streams/change_stream.test.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
import { strict as assert } from 'assert';
2-
import { Document, Long, UUID } from 'bson';
2+
import { type Document, Long, UUID } from 'bson';
33
import { expect } from 'chai';
44
import { on, once } from 'events';
55
import { gte, lt } from 'semver';
66
import * as sinon from 'sinon';
77
import { PassThrough } from 'stream';
88
import { setTimeout } from 'timers';
99

10+
import {
11+
type ChangeStream,
12+
type ChangeStreamDocument,
13+
type ChangeStreamOptions,
14+
type ResumeToken
15+
} from '../../../src/change_stream';
16+
import { type CommandStartedEvent } from '../../../src/cmap/command_monitoring_events';
17+
import { type Collection } from '../../../src/collection';
18+
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
19+
import { type Db } from '../../../src/db';
20+
import { MongoAPIError, MongoChangeStreamError, MongoServerError } from '../../../src/error';
21+
import { type MongoClient } from '../../../src/mongo_client';
22+
import { ReadPreference } from '../../../src/read_preference';
23+
import { isHello } from '../../../src/utils';
1024
import * as mock from '../../tools/mongodb-mock/index';
1125
import { TestBuilder, UnifiedTestSuiteBuilder } from '../../tools/unified_suite_builder';
1226
import { type FailCommandFailPoint, sleep } from '../../tools/utils';
1327
import { delay, filterForCommands } from '../shared';
14-
import { ChangeStream, ChangeStreamDocument, ChangeStreamOptions, ResumeToken } from '../../../src/change_stream';
15-
import { MongoClient } from '../../../src/mongo_client';
16-
import { ReadPreference } from '../../../src/read_preference';
17-
import { Collection } from '../../../src/collection';
18-
import { Db } from '../../../src/db';
19-
import { CommandStartedEvent } from '../../../src/cmap/command_monitoring_events';
20-
import { isHello } from '../../../src/utils';
21-
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
22-
import { MongoAPIError, MongoChangeStreamError, MongoServerError } from '../../../src/error';
2328

2429
const initIteratorMode = async (cs: ChangeStream) => {
2530
const initEvent = once(cs.cursor, 'init');
@@ -469,8 +474,8 @@ describe('Change Streams', function () {
469474
expect(res).to.exist;
470475

471476
const err = await changeStream.next().catch(e => e);
472-
expect(err).to.exist;
473-
console.log(`pavel >>> ${JSON.stringify(err)}`);
477+
expect(err).to.exist;
478+
console.log(`pavel >>> ${JSON.stringify(err)}`);
474479
await changeStream.close();
475480
await client.close();
476481
}
@@ -1306,7 +1311,7 @@ describe('Change Streams', function () {
13061311
const collection = client.db('cs').collection('test');
13071312
const changeStream = collection.watch();
13081313
try {
1309-
await changeStream.next();
1314+
await changeStream.next();
13101315
} catch (err) {
13111316
expect(err).to.exist;
13121317
expect(err?.message).to.equal('ChangeStream is closed');

test/integration/change-streams/change_streams.prose.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
import { type Document, Long, ObjectId, Timestamp } from 'bson';
12
import { expect } from 'chai';
23
import { once } from 'events';
34
import * as sinon from 'sinon';
45
import { setTimeout } from 'timers';
56

7+
import { type ChangeStream } from '../../../src/change_stream';
8+
import {
9+
type CommandFailedEvent,
10+
type CommandStartedEvent,
11+
type CommandSucceededEvent
12+
} from '../../../src/cmap/command_monitoring_events';
13+
import { type Collection } from '../../../src/collection';
14+
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
15+
import { MongoNetworkError } from '../../../src/error';
16+
import { type MongoClient } from '../../../src/mongo_client';
617
import * as mock from '../../tools/mongodb-mock/index';
718
import { setupDatabase } from '../shared';
8-
import { ChangeStream } from '../../../src/change_stream';
9-
import { MongoNetworkError } from '../../../src/error';
10-
import { Collection } from '../../../src/collection';
11-
import { MongoClient } from '../../../src/mongo_client';
12-
import { Document, Long, ObjectId, Timestamp } from 'bson';
13-
import { CommandFailedEvent, CommandStartedEvent, CommandSucceededEvent } from '../../../src/cmap/command_monitoring_events';
14-
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
1519

1620
/**
1721
* Triggers a fake resumable error on a change stream

0 commit comments

Comments
 (0)