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

Lines changed: 3 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy