GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — registry-stack/scripts/run-node-tests.mjs at main · registrystack/registry-stack Expand file tree/ Copy pathrun-node-tests.mjsMore file actions 37 lines (33 loc) · 1.29 KB / Copy pathrun-node-tests.mjsFile metadata and controls37 lines (33 loc) · 1.29 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #!/usr/bin/env node // Run native Node binding tests with Cargo's macOS runtime library available. // npm launches package scripts through a protected shell that strips DYLD_*; // the non-DYLD carrier survives, so restore the loader path on the Node child // that actually imports the addon. import { spawnSync } from 'node:child_process'; import { pathToFileURL } from 'node:url'; export function cargoRuntimeEnvironment(environment, platform = process.platform) { const child = { ...environment }; const runtime = child.REGISTRY_CARGO_RUNTIME_LIBRARY_PATH; if (platform === 'darwin' && runtime) { child.DYLD_LIBRARY_PATH = runtime + (child.DYLD_LIBRARY_PATH ? `:${child.DYLD_LIBRARY_PATH}` : ''); } return child; } export function run(arguments_) { if (arguments_.length === 0) { console.error('run-node-tests: at least one test path is required'); return 2; } const completed = spawnSync(process.execPath, ['--test', ...arguments_], { env: cargoRuntimeEnvironment(process.env), stdio: 'inherit', }); if (completed.error) { console.error(`run-node-tests: ${completed.error.message}`); return 1; } return completed.status ?? 1; } if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { process.exitCode = run(process.argv.slice(2)); } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |