Skip to content

Commit de9735e

Browse files
committed
used single call
1 parent 9fcc36d commit de9735e

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
1-
'use strict';
1+
"use strict";
22
// This tests heap snapshot integration of SecureContext.
33

4-
const common = require('../common');
4+
const common = require("../common");
55

6-
if (!common.hasCrypto)
7-
common.skip('missing crypto');
6+
if (!common.hasCrypto) common.skip("missing crypto");
87

9-
const fixtures = require('../common/fixtures');
10-
const assert = require('assert');
11-
const { validateByRetainingPath } = require('../common/heap');
12-
const tls = require('tls');
8+
const fixtures = require("../common/fixtures");
9+
const assert = require("assert");
10+
const { validateByRetainingPath } = require("../common/heap");
11+
const tls = require("tls");
1312

1413
{
15-
const nodes = validateByRetainingPath('Node / SecureContext', []);
14+
const nodes = validateByRetainingPath("Node / SecureContext", []);
1615
assert.strictEqual(nodes.length, 0);
1716
}
1817

1918
// eslint-disable-next-line no-unused-vars
2019
const ctx = tls.createSecureContext({
21-
cert: fixtures.readKey('agent1-cert.pem'),
22-
key: fixtures.readKey('agent1-key.pem'),
20+
cert: fixtures.readKey("agent1-cert.pem"),
21+
key: fixtures.readKey("agent1-key.pem"),
2322
});
2423

25-
validateByRetainingPath('Node / SecureContext', [
26-
{ edge_name: 'ctx', node_name: 'Node / ctx' },
27-
]);
28-
29-
validateByRetainingPath('Node / SecureContext', [
30-
{ edge_name: 'cert', node_name: 'Node / cert' },
24+
validateByRetainingPath("Node / SecureContext", [
25+
{ edge_name: "ctx", node_name: "Node / ctx" },
26+
{ edge_name: "cert", node_name: "Node / cert" },
3127
]);

0 commit comments

Comments
 (0)