Lines Matching defs:const
2 const common = require('../common');
3 const fs = require('fs');
4 const path = require('path');
10 const { WASI } = require('wasi');
11 const wasmDir = path.join(__dirname, 'wasm');
12 const wasi = new WASI({
20 const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
21 const modulePath = path.join(wasmDir, `${process.argv[3]}.wasm`);
22 const buffer = fs.readFileSync(modulePath);
25 const { instance } = await WebAssembly.instantiate(buffer, importObject);
34 const assert = require('assert');
35 const cp = require('child_process');
36 const tmpdir = require('../common/tmpdir');
40 const sandbox = path.join(tmpdir.path, 'sandbox');
41 const sandboxedFile = path.join(sandbox, 'input.txt');
42 const externalFile = path.join(tmpdir.path, 'outside.txt');
43 const sandboxedDir = path.join(sandbox, 'subdir');
44 const sandboxedSymlink = path.join(sandboxedDir, 'input_link.txt');
45 const escapingSymlink = path.join(sandboxedDir, 'outside.txt');
46 const loopSymlink1 = path.join(sandboxedDir, 'loop1');
47 const loopSymlink2 = path.join(sandboxedDir, 'loop2');
48 const sandboxedTmp = path.join(tmpdir.path, 'tmp');
64 const opts = { env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' } };
65 const child = cp.spawnSync(process.execPath, [