Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: add test for invalid cert string
`tls.parseCertString()` should return an empty object if passed an
invalid cert string. This behavior is not currently tested. Add minimal
test.
  • Loading branch information
Trott committed Aug 19, 2016
commit 60b6bed891d76146367276b073279c588dad5992
4 changes: 4 additions & 0 deletions test/parallel/test-tls-parse-cert-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ assert.deepStrictEqual(doublesOut, {
OU: [ 'Domain Control Validated', 'PositiveSSL Wildcard' ],
CN: '*.nodejs.org'
});

const invalid = 'fhqwhgads';
const invalidOut = tls.parseCertString(invalid);
assert.deepStrictEqual(invalidOut, {});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add brackets to scope the above statements?