Skip to content

Commit b15f5f3

Browse files
committed
lint and test cleanup
1 parent 347c47d commit b15f5f3

File tree

2 files changed

+1
-63
lines changed

2 files changed

+1
-63
lines changed

src/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ export function isPromiseLike<T = unknown>(value?: unknown): value is PromiseLik
205205
* @param target - target of command
206206
* @param options - options containing collation settings
207207
*/
208-
export function decorateWithCollation(
209-
command: Document, options: AnyOptions
210-
): void {
208+
export function decorateWithCollation(command: Document, options: AnyOptions): void {
211209
if (options.collation && typeof options.collation === 'object') {
212210
command.collation = options.collation;
213211
}

test/unit/change_stream.test.ts

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -184,36 +184,6 @@ describe('ChangeStreamCursor', function () {
184184
expect(cursor.resumeOptions).to.haveOwnProperty('startAtOperationTime');
185185
});
186186
});
187-
188-
context('when the maxWireVersion < 7', function () {
189-
let cursor: ChangeStreamCursor;
190-
beforeEach(function () {
191-
cursor = new ChangeStreamCursor(
192-
new MongoClient('mongodb://localhost:27027'),
193-
new MongoDBNamespace('db', 'collection'),
194-
[],
195-
{
196-
startAfter: 'start after',
197-
resumeAfter: 'resume after',
198-
startAtOperationTime: new Timestamp(Long.ZERO)
199-
}
200-
);
201-
cursor.resumeToken = null;
202-
sinon.stub(cursor, 'server').get(() => ({ hello: { maxWireVersion: 6 } }));
203-
});
204-
205-
it('does NOT set the resumeAfter option', function () {
206-
expect(cursor.resumeOptions).not.to.haveOwnProperty('resumeAfter');
207-
});
208-
209-
it('does NOT set the startAfter option', function () {
210-
expect(cursor.resumeOptions).not.to.haveOwnProperty('startAfter');
211-
});
212-
213-
it('does NOT set the startAtOperationTime option', function () {
214-
expect(cursor.resumeOptions).not.to.haveOwnProperty('startAtOperationTime');
215-
});
216-
});
217187
});
218188

219189
context('when the cursor does NOT have a saved operation time', function () {
@@ -266,36 +236,6 @@ describe('ChangeStreamCursor', function () {
266236
expect(cursor.resumeOptions).not.to.haveOwnProperty('startAtOperationTime');
267237
});
268238
});
269-
270-
context('when the maxWireVersion < 7', function () {
271-
let cursor: ChangeStreamCursor;
272-
beforeEach(function () {
273-
cursor = new ChangeStreamCursor(
274-
new MongoClient('mongodb://localhost:27027'),
275-
new MongoDBNamespace('db', 'collection'),
276-
[],
277-
{
278-
startAfter: 'start after',
279-
resumeAfter: 'resume after',
280-
startAtOperationTime: new Timestamp(Long.ZERO)
281-
}
282-
);
283-
cursor.resumeToken = null;
284-
sinon.stub(cursor, 'server').get(() => ({ hello: { maxWireVersion: 6 } }));
285-
});
286-
287-
it('does NOT set the resumeAfter option', function () {
288-
expect(cursor.resumeOptions).not.to.haveOwnProperty('resumeAfter');
289-
});
290-
291-
it('does NOT set the startAfter option', function () {
292-
expect(cursor.resumeOptions).not.to.haveOwnProperty('startAfter');
293-
});
294-
295-
it('does NOT set the startAtOperationTime option', function () {
296-
expect(cursor.resumeOptions).not.to.haveOwnProperty('startAtOperationTime');
297-
});
298-
});
299239
});
300240
});
301241
});

0 commit comments

Comments
 (0)