Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c65de59

Browse filesBrowse files
jfmercerMylesBorins
authored andcommitted
test: add regex for expected error message
Provide a regex to validate the error message. PR-URL: #12011 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent fcc19e1 commit c65de59
Copy full SHA for c65de59

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-tls-key-mismatch.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-key-mismatch.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ if (!common.hasCrypto) {
88
const assert = require('assert');
99
const tls = require('tls');
1010
const fs = require('fs');
11+
const errorMessageRegex = new RegExp('^Error: error:0B080074:x509 ' +
12+
'certificate routines:X509_check_private_key:key values mismatch$');
1113

1214
const options = {
1315
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
@@ -16,4 +18,4 @@ const options = {
1618

1719
assert.throws(function() {
1820
tls.createSecureContext(options);
19-
});
21+
}, errorMessageRegex);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.