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 () {
6464 expect ( options ) . has . property ( 'tls' , true ) ;
6565 } ) ;
6666
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+ } ) ;
6789 const ALL_OPTIONS = {
6890 appName : 'cats' ,
6991 auth : { username : 'username' , password : 'password' } ,
You can’t perform that action at this time.
0 commit comments