File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,28 @@ describe('MongoOptions', function () {
64
64
expect ( options ) . has . property ( 'tls' , true ) ;
65
65
} ) ;
66
66
67
+ context ( 'tlsCAFile' , function ( ) {
68
+ it ( 'throws MongoParseError when passed a URL Object' , function ( ) {
69
+ it ( 'throws MongoParseError when passed a URL Object' , function ( ) {
70
+ expect (
71
+ ( ) =>
72
+ new MongoClient ( 'mongodb://localhost:27017' , {
73
+ tlsCAFile : new URL ( 'file://hello' )
74
+ } )
75
+ ) . to . throw ( MongoParseError ) ;
76
+ } ) ;
77
+ } ) ;
78
+ } ) ;
79
+ context ( 'tlsCertificateKeyFile' , function ( ) {
80
+ it ( 'throws MongoParseError when passed a URL Object' , function ( ) {
81
+ expect (
82
+ ( ) =>
83
+ new MongoClient ( 'mongodb://localhost:27017' , {
84
+ tlsCertificateKeyFile : new URL ( 'file://hello' )
85
+ } )
86
+ ) . to . throw ( MongoParseError ) ;
87
+ } ) ;
88
+ } ) ;
67
89
const ALL_OPTIONS = {
68
90
appName : 'cats' ,
69
91
auth : { username : 'username' , password : 'password' } ,
You can’t perform that action at this time.
0 commit comments