MCPcopy Create free account
hub / github.com/Effect-TS/effect / run

Function run

packages/effect/test/Data.test.ts:13–24  ·  view source on GitHub ↗
(command: string, args: ReadonlyArray<string>, cwd: string)

Source from the content-addressed store, hash-verified

11// Runs a command without blocking the Vitest worker, so concurrent sibling
12// tests are not held up (and timed out) while it runs.
13const run = (command: string, args: ReadonlyArray<string>, cwd: string) =>
14 new Promise<{ readonly status: number | null; readonly stdout: string; readonly stderr: string }>(
15 (resolve, reject) => {
16 const child = spawn(command, args, { cwd })
17 let stdout = ""
18 let stderr = ""
19 child.stdout.setEncoding("utf8").on("data", (data) => stdout += data)
20 child.stderr.setEncoding("utf8").on("data", (data) => stderr += data)
21 child.on("error", reject)
22 child.on("close", (status) => resolve({ status, stdout, stderr }))
23 }
24 )
25
26describe("Data", () => {
27 describe("Class", () => {

Callers 11

FiberSet.test.tsFile · 0.70
Effect.test.tsFile · 0.70
withCaptureDisabledFunction · 0.70
countErrorsFunction · 0.70
countStackReadsFunction · 0.70
Data.test.tsFile · 0.70
Graph.test.tsFile · 0.70
FiberMap.test.tsFile · 0.70
Schedule.test.tsFile · 0.70

Calls 3

onMethod · 0.65
spawnFunction · 0.50
resolveFunction · 0.50

Tested by

no test coverage detected