Skip to content

Commit 96e4425

Browse files
fix dependency tests
1 parent a493d57 commit 96e4425

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/action/dependency.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import * as path from 'node:path';
55
import { expect } from 'chai';
66

77
import { dependencies, peerDependencies, peerDependenciesMeta } from '../../package.json';
8+
import { setDifference } from '../mongodb';
89
import { itInNodeProcess } from '../tools/utils';
910

10-
const EXPECTED_DEPENDENCIES = ['bson', 'mongodb-connection-string-url'];
11+
const EXPECTED_DEPENDENCIES = ['bson', 'mongodb-connection-string-url', '@mongodb-js/saslprep'];
1112
const EXPECTED_PEER_DEPENDENCIES = [
1213
'@aws-sdk/credential-providers',
1314
'@mongodb-js/zstd',
@@ -21,7 +22,7 @@ const EXPECTED_PEER_DEPENDENCIES = [
2122
describe('package.json', function () {
2223
describe('dependencies', function () {
2324
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);
2526
});
2627
});
2728

@@ -118,7 +119,7 @@ describe('package.json', function () {
118119

119120
const EXPECTED_IMPORTS = [
120121
'bson',
121-
'saslprep',
122+
'@mongodb-js/saslprep',
122123
'sparse-bitfield',
123124
'memory-pager',
124125
'mongodb-connection-string-url',
@@ -150,7 +151,7 @@ describe('package.json', function () {
150151

151152
context('when importing mongodb', () => {
152153
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());
154155
});
155156

156157
it('does not import optional dependencies', () => {

0 commit comments

Comments
 (0)