Lines Matching defs:const
3 const common = require('../common');
15 const { debuglog } = require('util');
16 const debug = debuglog('test');
17 const tmpdir = require('../common/tmpdir');
18 const assert = require('assert');
19 const { spawnSync, spawn } = require('child_process');
20 const crypto = require('crypto');
21 const fs = require('fs');
22 const path = require('path');
23 const { pathToFileURL } = require('url');
25 const cpus = require('os').availableParallelism();
28 const values = [];
30 const h = crypto.createHash(algo);
35 const h = crypto.createHash(algo);
42 const policyPath = './policy.json';
43 const parentBody = {
63 const workerSpawningBody = `
64 const path = require('path');
65 const { Worker } = require('worker_threads');
78 const w = new Worker(path.resolve(process.env.PARENT_FILE));
90 const toSpawn = [];
101 const config = toSpawn.shift();
102 const {
111 const testId = newTestId();
112 const configDirPath = path.join(
116 const tmpPolicyPath = path.join(
123 const manifest = {
127 const manifestPath = path.join(configDirPath, policyPath);
128 for (const [resourcePath, { body, integrities }] of Object.entries(
131 const filePath = path.join(configDirPath, resourcePath);
140 const manifestBody = JSON.stringify(manifest);
145 const spawnArgs = [
169 const stdout = [];
170 const stderr = [];
171 const child = spawn(...spawnArgs);
204 const { status } = spawnSync(
214 const enoentFilepath = path.join(tmpdir.path, 'enoent');
220 const { status } = spawnSync(
237 const keys = Object.keys(configurations);
241 const config = keys[0];
242 const { [config]: values, ...otherConfigs } = configurations;
247 const tests = new Set();
258 for (const permutation of permutations({
268 const parentPath = `./parent${permutation.parentExtension}`;
269 const parentFormat = fileExtensionFormat(permutation.parentExtension);
270 const depFormat = fileExtensionFormat(permutation.depExtension);
276 const depPath = `./dep${permutation.depExtension}`;
277 const workerSpawnerPath = './worker-spawner.cjs';
279 const resources = {
342 for (const config of tests) {
343 const parsed = JSON.parse(config);