@@ -5,9 +5,10 @@ import * as path from 'node:path';
5
5
import { expect } from 'chai' ;
6
6
7
7
import { dependencies , peerDependencies , peerDependenciesMeta } from '../../package.json' ;
8
+ import { setDifference } from '../mongodb' ;
8
9
import { itInNodeProcess } from '../tools/utils' ;
9
10
10
- const EXPECTED_DEPENDENCIES = [ 'bson' , 'mongodb-connection-string-url' ] ;
11
+ const EXPECTED_DEPENDENCIES = [ 'bson' , 'mongodb-connection-string-url' , '@mongodb-js/saslprep' ] ;
11
12
const EXPECTED_PEER_DEPENDENCIES = [
12
13
'@aws-sdk/credential-providers' ,
13
14
'@mongodb-js/zstd' ,
@@ -21,7 +22,7 @@ const EXPECTED_PEER_DEPENDENCIES = [
21
22
describe ( 'package.json' , function ( ) {
22
23
describe ( 'dependencies' , function ( ) {
23
24
it ( 'only contains the expected dependencies' , function ( ) {
24
- expect ( dependencies ) . to . have . keys ( EXPECTED_DEPENDENCIES ) ;
25
+ expect ( Object . keys ( dependencies ) ) . to . deep . equal ( EXPECTED_DEPENDENCIES ) ;
25
26
} ) ;
26
27
} ) ;
27
28
@@ -118,7 +119,7 @@ describe('package.json', function () {
118
119
119
120
const EXPECTED_IMPORTS = [
120
121
'bson' ,
121
- 'saslprep' ,
122
+ '@mongodb-js/ saslprep' ,
122
123
'sparse-bitfield' ,
123
124
'memory-pager' ,
124
125
'mongodb-connection-string-url' ,
@@ -150,7 +151,7 @@ describe('package.json', function () {
150
151
151
152
context ( 'when importing mongodb' , ( ) => {
152
153
it ( 'only contains the expected imports' , function ( ) {
153
- expect ( imports ) . to . deep . equal ( EXPECTED_IMPORTS ) ;
154
+ expect ( setDifference ( imports , EXPECTED_IMPORTS ) ) . to . deep . equal ( new Set ( ) ) ;
154
155
} ) ;
155
156
156
157
it ( 'does not import optional dependencies' , ( ) => {
0 commit comments