nyx/tests/dynamic_fixtures/javascript/esm_default/benign.js

19 lines
459 B
JavaScript
Raw Permalink Normal View History

2026-06-05 10:16:30 -05:00
// Phase 13 — ES module default export, benign control.
//
// nyx-shape: esm-default
import { execFileSync } from 'child_process';
export default function runPing(host) {
process.stdout.write('__NYX_SINK_HIT__\n');
try {
execFileSync('true', [host], {
encoding: 'utf8',
timeout: 5000,
stdio: ['ignore', 'pipe', 'ignore'],
});
return 'ok';
} catch (_e) {
return 'err';
}
}