Skip to content

Commit 4e2c652

Browse files
committed
test: fix options test
1 parent 64d5fac commit 4e2c652

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

test/unit/client-side-encryption/state_machine.test.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -190,27 +190,25 @@ describe('StateMachine', function () {
190190

191191
context('when tls options are provided', function () {
192192
context('when the options are insecure', function () {
193-
[
194-
'tlsInsecure',
195-
'tlsAllowInvalidCertificates',
196-
'tlsAllowInvalidHostnames',
197-
'tlsDisableOCSPEndpointCheck',
198-
'tlsDisableCertificateRevocationCheck'
199-
].forEach(function (option) {
200-
context(`when the option is ${option}`, function () {
201-
const stateMachine = new StateMachine({
202-
tlsOptions: { aws: { [option]: true } }
203-
} as any);
204-
const request = new MockRequest(Buffer.from('foobar'), 500);
205-
206-
it('rejects with the validation error', function (done) {
207-
stateMachine.kmsRequest(request).catch(err => {
208-
expect(err.message).to.equal(`Insecure TLS options prohibited for aws: ${option}`);
209-
done();
193+
['tlsInsecure', 'tlsAllowInvalidCertificates', 'tlsAllowInvalidHostnames'].forEach(
194+
function (option) {
195+
context(`when the option is ${option}`, function () {
196+
const stateMachine = new StateMachine({
197+
tlsOptions: { aws: { [option]: true } }
198+
} as any);
199+
const request = new MockRequest(Buffer.from('foobar'), 500);
200+
201+
it('rejects with the validation error', function (done) {
202+
stateMachine.kmsRequest(request).catch(err => {
203+
expect(err.message).to.equal(
204+
`Insecure TLS options prohibited for aws: ${option}`
205+
);
206+
done();
207+
});
210208
});
211209
});
212-
});
213-
});
210+
}
211+
);
214212
});
215213

216214
context('when the options are secure', function () {

0 commit comments

Comments
 (0)