Skip to content

Commit 6843ca7

Browse files
mhdawsontargos
authored andcommitted
test: add asserts to validate test assumptions
Refs: #54968 Refs: #53382 Add additional asserts as suggestd by Richard in: #54968 Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #54997 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a81f368 commit 6843ca7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-tls-cert-regression.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'use strict';
2323
const common = require('../common');
2424
const fixtures = require('../common/fixtures');
25+
const assert = require('assert');
2526

2627
if (!common.hasCrypto)
2728
common.skip('missing crypto');
@@ -43,6 +44,8 @@ while (cert[cert.length - 1 - i] === 0x0a) i++;
4344
if (i !== 0) cert = cert.slice(0, cert.length - i);
4445

4546
function test(cert, key, cb) {
47+
assert.notStrictEqual(cert.at(-1), 0x0a);
48+
assert.notStrictEqual(key.at(-1), 0x0a);
4649
const server = tls.createServer({
4750
cert,
4851
key

0 commit comments

Comments
 (0)