|
1 | | -'use strict'; |
| 1 | +"use strict"; |
2 | 2 | // This tests heap snapshot integration of SecureContext. |
3 | 3 |
|
4 | | -const common = require('../common'); |
| 4 | +const common = require("../common"); |
5 | 5 |
|
6 | | -if (!common.hasCrypto) |
7 | | - common.skip('missing crypto'); |
| 6 | +if (!common.hasCrypto) common.skip("missing crypto"); |
8 | 7 |
|
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"); |
13 | 12 |
|
14 | 13 | { |
15 | | - const nodes = validateByRetainingPath('Node / SecureContext', []); |
| 14 | + const nodes = validateByRetainingPath("Node / SecureContext", []); |
16 | 15 | assert.strictEqual(nodes.length, 0); |
17 | 16 | } |
18 | 17 |
|
19 | 18 | // eslint-disable-next-line no-unused-vars |
20 | 19 | 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"), |
23 | 22 | }); |
24 | 23 |
|
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" }, |
31 | 27 | ]); |
0 commit comments