Skip to content

Commit b84efcd

Browse files
committed
test(NODE-7179): migrate test/types/*
1 parent 339c48b commit b84efcd

32 files changed

Lines changed: 65 additions & 49 deletions

test/types/admin.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expectType } from 'tsd';
22

3-
import { type Document, MongoClient } from '../mongodb';
3+
import { type Document, MongoClient } from '../../src';
44

55
const client = new MongoClient('');
66
const admin = client.db().admin();

test/types/basic_schema.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd';
22

3-
import { Collection, Db, type Document, type InferIdType, MongoClient, ObjectId } from '../mongodb';
3+
import { Collection, Db, type Document, type InferIdType, MongoClient, ObjectId } from '../../src';
44

55
const db = new Db(new MongoClient(''), '');
66

test/types/bson.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expectType } from 'tsd';
22

3-
import type { BSONSerializeOptions, Document } from '../mongodb';
3+
import type { BSONSerializeOptions, Document } from '../../src';
44

55
const options: BSONSerializeOptions = {};
66

test/types/change_stream.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import type {
2727
ServerSessionId,
2828
Timestamp,
2929
UpdateDescription
30-
} from '../mongodb';
30+
} from '../../src';
3131

3232
declare const changeStreamOptions: ChangeStreamOptions;
3333
type ChangeStreamOperationType =

test/types/client-side-encryption.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
KMSProviders,
1111
RangeOptions
1212
} from '../..';
13-
import { Binary, type ClientEncryptionDataKeyProvider } from '../mongodb';
13+
import { Binary, type ClientEncryptionDataKeyProvider } from '../../src';
1414

1515
type RequiredCreateEncryptedCollectionSettings = Parameters<
1616
ClientEncryption['createEncryptedCollection']

test/types/client_bulk_write.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
type UpdateFilter,
1616
type UUID,
1717
type WithoutId
18-
} from '../mongodb';
18+
} from '../../src';
1919

2020
declare const client: MongoClient;
2121
type Book = { title: string; released: Date };

test/types/community/bulk/bulk-operation-base.test-d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { expectType } from 'tsd';
22

33
import {
4-
Batch,
54
type BatchType,
6-
BulkOperationBase,
75
type BulkWriteOptions,
86
type BulkWriteResult,
97
type DeleteStatement,
108
type Document,
119
MongoClient,
1210
type UpdateStatement
13-
} from '../../../mongodb';
11+
} from '../../../../src';
12+
import { Batch, BulkOperationBase } from '../../../../src/bulk/common';
1413

1514
const client = new MongoClient('');
1615
const db = client.db('test');

test/types/community/client.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ReadPreference,
1010
type ReadPreferenceMode,
1111
type W
12-
} from '../../mongodb';
12+
} from '../../../src';
1313

1414
// TODO(NODE-3348): Improve the tests to expectType assertions
1515

test/types/community/collection/aggregate.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expectNotType, expectType } from 'tsd';
22

3-
import { type AggregationCursor, type Document, MongoClient } from '../../../mongodb';
3+
import { type AggregationCursor, type Document, MongoClient } from '../../../../src';
44

55
// collection.aggregate tests
66
const client = new MongoClient('');

test/types/community/collection/bulkWrite.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
type Document,
77
MongoClient,
88
ObjectId
9-
} from '../../../mongodb';
9+
} from '../../../../src';
1010

1111
// TODO(NODE-3347): Improve these tests to use more expect assertions
1212

0 commit comments

Comments
 (0)