Skip to content

Commit c6c4ddf

Browse files
committed
test: ensure proper error properties in tests
1 parent 8e43f11 commit c6c4ddf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/integration/client-side-encryption/client_side_encryption.prose.10.kms_tls.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const metadata: MongoDBMetadataUI = {
99
}
1010
};
1111

12-
describe('10. KMS TLS Tests', function () {
12+
describe.only('10. KMS TLS Tests', function () {
1313
const keyVaultNamespace = 'keyvault.datakeys';
1414
const masterKeyBase = {
1515
region: 'us-east-1',
@@ -47,6 +47,8 @@ describe('10. KMS TLS Tests', function () {
4747
error => error
4848
);
4949

50+
expect(error).to.exist;
51+
expect(error).to.have.property('cause').that.is.instanceOf(Error);
5052
expect(error.cause.message, error.stack).to.include('certificate has expired');
5153
});
5254

@@ -58,6 +60,8 @@ describe('10. KMS TLS Tests', function () {
5860
error => error
5961
);
6062

63+
expect(error).to.exist;
64+
expect(error).to.have.property('cause').that.is.instanceOf(Error);
6165
expect(error.cause.message, error.stack).to.include('does not match certificate');
6266
});
6367
});

0 commit comments

Comments
 (0)