Skip to content

Commit 8278fb5

Browse files
fix
1 parent a70b1f5 commit 8278fb5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/integration/node-specific/client_encryption.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { expect } from 'chai';
22
import { readFileSync } from 'fs';
33
import * as sinon from 'sinon';
44

5+
import { MongoCryptError } from '../../../src';
56
import {
67
ClientEncryption,
78
type DataKey
@@ -391,7 +392,7 @@ describe('ClientEncryption integration tests', function () {
391392
.encryptExpression(expression, completeOptions)
392393
.catch(e => e);
393394

394-
expect(errorOrResult).to.be.instanceof(TypeError);
395+
expect(errorOrResult).to.be.instanceof(MongoCryptError);
395396
});
396397

397398
it('throws if algorithm is not provided', metadata, async function () {
@@ -400,7 +401,7 @@ describe('ClientEncryption integration tests', function () {
400401
.encryptExpression(expression, completeOptions)
401402
.catch(e => e);
402403

403-
expect(errorOrResult).to.be.instanceof(TypeError);
404+
expect(errorOrResult).to.be.instanceof(MongoCryptError);
404405
});
405406

406407
it(`throws if algorithm does not equal 'range'`, metadata, async function () {
@@ -409,7 +410,7 @@ describe('ClientEncryption integration tests', function () {
409410
.encryptExpression(expression, completeOptions)
410411
.catch(e => e);
411412

412-
expect(errorOrResult).to.be.instanceof(TypeError);
413+
expect(errorOrResult).to.be.instanceof(MongoCryptError);
413414
});
414415

415416
it(`works with any casing of 'range'`, metadata, async function () {

0 commit comments

Comments
 (0)