Lines Matching defs:const
23 const common = require('../common');
24 const tmpdir = require('../common/tmpdir');
27 const assert = require('assert');
29 const { execFileSync, execSync, spawnSync } = require('child_process');
30 const { getSystemErrorName } = require('util');
32 const TIMER = 200;
41 const execOpts = { encoding: 'utf8', shell: true };
55 const start = Date.now();
57 const cmd = `"${process.execPath}" -e "setTimeout(function(){}, ${SLEEP});"`;
67 const end = Date.now() - start;
76 const msg = 'foobar';
77 const msgBuf = Buffer.from(`${msg}\n`);
81 const cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
84 const ret = execSync(cmd);
90 const ret = execSync(cmd, { encoding: 'utf8' });
94 const args = [
99 const ret = execFileSync(process.execPath, args);
104 const ret = execFileSync(process.execPath, args, { encoding: 'utf8' });
111 const cwd = tmpdir.path;
112 const cmd = common.isWindows ? 'echo %cd%' : 'pwd';
113 const response = execSync(cmd, { cwd });
128 const args = ['-e', 'process.exit(1)'];
129 const spawnSyncResult = spawnSync(process.execPath, args);
130 const spawnSyncKeys = Object.keys(spawnSyncResult).sort();
143 const msg = `Command failed: ${process.execPath} ${args.join(' ')}`;