Lines Matching defs:const
4 const common = require('../common');
5 const tmpdir = require('../common/tmpdir');
6 const path = require('path');
12 const PIPE = (() => {
13 const localRelative = path.relative(process.cwd(), `${tmpdir.path}/`);
14 const pipePrefix = common.isWindows ? '\\\\?\\pipe\\' : localRelative;
15 const pipeName = `node-test.${process.pid}.sock`;
20 const fs = require('fs');
38 const spawn = require('child_process').spawn;
40 const cp = spawn(process.execPath,
51 const timeout = setInterval(() => {}, 1000);
61 const http = require('http');
65 const server = http.createServer((req, res) => {
84 const dgram = require('dgram');
85 const udpSocket = dgram.createSocket('udp4');
86 const connectedUdpSocket = dgram.createSocket('udp4');
102 const net = require('net');
103 const sockPath = PIPE;
105 const server = net.createServer((socket) => {
122 const exit = () => process.exit(2);
125 const childData = {};
126 const disposes = await Promise.all([
149 const helper = require('../common/report.js');
150 const fork = require('child_process').fork;
151 const assert = require('assert');
153 const options = { encoding: 'utf8', silent: true, cwd: tmpdir.path };
154 const child = fork(__filename, ['child'], options);
160 const report_msg = 'Report files were written: unexpectedly';
169 const reports = helper.findReports(child.pid, tmpdir.path);
174 const get_libuv = /"libuv":\s\[([\s\S]*?)\]/g;
175 const get_handle_inner = /{([\s\S]*?),*?}/g;
176 const libuv_handles_str = get_libuv.exec(stdout)[1];
177 const libuv_handles_array = libuv_handles_str.match(get_handle_inner);
178 for (const i of libuv_handles_array) {
181 const handle_keys = i.match(/(".*"):/g);
188 const report = JSON.parse(stdout);
189 const prefix = common.isWindows ? '\\\\?\\' : '';
190 const expected_filename = `${prefix}${__filename}`;
191 const found_tcp = [];
192 const found_udp = [];
193 const found_named_pipe = [];
195 const validators = {
218 const sockPath = child_data.pipe_sock_path;
236 const port = child_data.tcp_address.port;
268 for (const entry of report.libuv) {
271 for (const socket of ['listening', 'inbound', 'outbound']) {
274 for (const socket of ['connected', 'unconnected']) {
277 for (const socket of ['listening', 'inbound']) {