MCPcopy
hub / github.com/affaan-m/ECC / run

Function run

tests/scripts/setup-package-manager.test.js:18–34  ·  view source on GitHub ↗
(args = [], env = {})

Source from the content-addressed store, hash-verified

16
17// Run the script with given args, return { stdout, stderr, code }
18function run(args = [], env = {}) {
19 try {
20 const stdout = execFileSync('node', [SCRIPT, ...args], {
21 encoding: 'utf8',
22 stdio: ['pipe', 'pipe', 'pipe'],
23 env: { ...process.env, ...env },
24 timeout: 10000
25 });
26 return { stdout, stderr: '', code: 0 };
27 } catch (err) {
28 return {
29 stdout: err.stdout || '',
30 stderr: err.stderr || '',
31 code: err.status || 1
32 };
33 }
34}
35
36// Test helper
37function test(name, fn) {

Callers 1

runTestsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected