Skip to content

Commit c0a3b73

Browse files
committed
test(NODE-7184): fix imports & convert into .ts
1 parent a576b7d commit c0a3b73

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

test/integration/read-write-concern/read_write_concern.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
import * as path from 'node:path';
22

33
import { loadSpecTests } from '../../spec';
44
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';

test/integration/read-write-concern/readconcern.test.js renamed to test/integration/read-write-concern/readconcern.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
'use strict';
2-
const { setupDatabase, filterForCommands } = require('../shared');
3-
const expect = require('chai').expect;
1+
import { expect } from 'chai';
42

5-
describe('ReadConcern', function () {
6-
let client;
3+
import { type MongoClient } from '../../../src';
4+
import { filterForCommands, setupDatabase } from '../shared';
5+
6+
describe.only('ReadConcern', function () {
7+
let client: MongoClient;
78

89
before(function () {
910
return setupDatabase(this.configuration);

test/integration/read-write-concern/write_concern.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77
type CommandStartedEvent,
88
type CommandSucceededEvent,
99
type Db,
10-
LEGACY_HELLO_COMMAND,
11-
MongoClient,
12-
OpMsgRequest
13-
} from '../../mongodb';
10+
MongoClient
11+
} from '../../../src';
12+
import { OpMsgRequest } from '../../../src/cmap/commands';
13+
import { LEGACY_HELLO_COMMAND } from '../../../src/constants';
1414
import * as mock from '../../tools/mongodb-mock/index';
1515
import { filterForCommands } from '../shared';
1616

@@ -144,7 +144,7 @@ describe('Write Concern', function () {
144144
async test() {
145145
const changeStream = col.watch(undefined, { batchSize: 2 });
146146
const changes = on(changeStream, 'change');
147-
await once(changeStream.cursor, 'init');
147+
await once(changeStream['cursor'], 'init');
148148

149149
await col.insertMany(
150150
[

0 commit comments

Comments
 (0)