We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbcfac2 commit b9699deCopy full SHA for b9699de
test/unit/bindings.test.ts
@@ -97,6 +97,24 @@ describe('MongoCryptConstructor', () => {
97
});
98
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
118
describe('options.encryptedFieldsMap', () => {
119
it('throws when provided and not a Uint8Array', () => {
120
expect(
0 commit comments