Skip to content

Commit 377d5dd

Browse files
committed
test: fix snappy installdep taking latest
1 parent e0875a8 commit 377d5dd

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fi
6161

6262
npm install @mongodb-js/zstd
6363

64-
# // TODO: NODE-7766 remove this pin when snappy is fixed
64+
# TODO: NODE-7766 remove this pin when snappy is fixed
6565
npm install snappy@7.3.3
6666

6767
export AUTH=$AUTH

test/action/dependency.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,15 @@ describe('package.json', function () {
6666
)) {
6767
// If a dependency specifies `alpha|beta`, the major version will fail to install because
6868
// an alpha < the major of that version (ex: mongodb-client-encryption@7.0.0-alpha < mongodb-client-encryption@7.0.0)
69-
const depInstallSpecifier = /alpha|beta/.test(depVersion)
69+
let depInstallSpecifier = /alpha|beta/.test(depVersion)
7070
? depVersion
7171
: depVersion.split('.')[0];
7272

73+
// TODO: NODE-7766 remove this pin when snappy is fixed
74+
if (depName === 'snappy') {
75+
depInstallSpecifier = '7.3.3';
76+
}
77+
7378
context(`when ${depName} is NOT installed`, () => {
7479
beforeEach(async () => {
7580
fs.rmSync(path.join(repoRoot, 'node_modules', depName), { recursive: true, force: true });

0 commit comments

Comments
 (0)