Skip to content

Commit aec8961

Browse files
committed
test(NODE-7179): cleanup imports
1 parent 8c6859b commit aec8961

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import {
1010
type CommandStartedEvent,
1111
type CommandSucceededEvent,
1212
type Document,
13-
LEGACY_HELLO_COMMAND,
1413
Long,
1514
type MongoClient,
1615
MongoNetworkError,
1716
ObjectId,
1817
Timestamp
19-
} from '../../mongodb';
18+
} from '../../../src';
19+
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
2020
import * as mock from '../../tools/mongodb-mock/index';
2121
import { setupDatabase } from '../shared';
2222

@@ -31,7 +31,7 @@ function triggerResumableError(changeStream: ChangeStream, delay: number, onClos
3131
function triggerResumableError(
3232
changeStream: ChangeStream,
3333
delay: number | (() => void),
34-
onClose?: () => void
34+
onClose?: (err?: Error) => void
3535
) {
3636
if (typeof delay === 'function') {
3737
onClose = delay;
@@ -53,7 +53,7 @@ function triggerResumableError(
5353
}
5454

5555
const nextStub = sinon.stub(changeStream.cursor, 'next').callsFake(async function () {
56-
callback(new MongoNetworkError('error triggered from test'));
56+
onClose(new MongoNetworkError('error triggered from test'));
5757
nextStub.restore();
5858
});
5959

test/integration/node-specific/bson-options/bsonRegExp.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const { expect } = require('chai');
4-
const { BSONRegExp } = require('../../../mongodb');
4+
const { BSONRegExp } = require('../../../../src');
55

66
describe('BSONRegExp', () => {
77
describe('bsonRegExp option', () => {

test/integration/node-specific/examples/transactions.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const { MongoClient } = require('../../../mongodb');
3+
const { MongoClient } = require('mongodb');
44

55
// Yes, we are shadowing a global here but we are not actually ever printing anything in this file
66
// This just so the examples can use console.log to make for nice copy pasting

test/integration/node-specific/examples/versioned_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
const { MongoClient } = require('../../../mongodb');
2+
const { MongoClient } = require('mongodb');
33

44
describe('examples.versionedApi:', function () {
55
let uri;

0 commit comments

Comments
 (0)