@@ -2,6 +2,7 @@ import { expect } from 'chai';
22import { readFileSync } from 'fs' ;
33import * as sinon from 'sinon' ;
44
5+ import { MongoCryptError } from '../../../src' ;
56import {
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