File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,24 @@ describe('MongoCryptConstructor', () => {
97
97
} ) ;
98
98
} ) ;
99
99
100
+ describe ( 'options.keyExpirationMS' , ( ) => {
101
+ context ( 'when the number is positive' , ( ) => {
102
+ it ( 'does not error' , ( ) => {
103
+ expect (
104
+ new MongoCrypt ( { kmsProviders : serialize ( { aws : { } } ) , keyExpirationMS : 1000000 } )
105
+ ) . to . be . instanceOf ( MongoCrypt ) ;
106
+ } ) ;
107
+ } ) ;
108
+
109
+ context ( 'when the number is negative' , ( ) => {
110
+ it ( 'throws an error' , ( ) => {
111
+ expect ( ( ) => {
112
+ new MongoCrypt ( { kmsProviders : serialize ( { aws : { } } ) , keyExpirationMS : - 1000000 } ) ;
113
+ } ) . to . throw ( TypeError ) ;
114
+ } ) ;
115
+ } ) ;
116
+ } ) ;
117
+
100
118
describe ( 'options.encryptedFieldsMap' , ( ) => {
101
119
it ( 'throws when provided and not a Uint8Array' , ( ) => {
102
120
expect (
You can’t perform that action at this time.
0 commit comments