MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-tls-cert-regression.js:46–55  ·  view source on GitHub ↗
(cert, key, cb)

Source from the content-addressed store, hash-verified

44if (i !== 0) cert = cert.slice(0, cert.length - i);
45
46function test(cert, key, cb) {
47 assert.notStrictEqual(cert.at(-1), 0x0a);
48 assert.notStrictEqual(key.at(-1), 0x0a);
49 const server = tls.createServer({
50 cert,
51 key
52 }).listen(0, function() {
53 server.close(cb);
54 });
55}
56
57test(cert, key, common.mustCall(function() {
58 test(Buffer.from(cert), Buffer.from(key), common.mustCall());

Callers 1

Calls 3

listenMethod · 0.80
closeMethod · 0.65
atMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…