MCPcopy Create free account
hub / github.com/dataform-co/dataform / getProcessResult

Function getProcessResult

testing/index.ts:30–41  ·  view source on GitHub ↗
(childProcess: ChildProcess)

Source from the content-addressed store, hash-verified

28export const corePackageTarPath = "packages/@dataform/core/package.tar.gz";
29
30export async function getProcessResult(childProcess: ChildProcess) {
31 let stderr = "";
32 childProcess.stderr.pipe(process.stderr);
33 childProcess.stderr.on("data", chunk => (stderr += String(chunk)));
34 let stdout = "";
35 childProcess.stdout.pipe(process.stdout);
36 childProcess.stdout.on("data", chunk => (stdout += String(chunk)));
37 const exitCode: number = await new Promise(resolve => {
38 childProcess.on("close", resolve);
39 });
40 return { exitCode, stdout, stderr };
41}
42
43export function asPlainObject<T>(object: T): T {
44 return JSON.parse(JSON.stringify(object)) as T;

Callers 8

setupTestProjectFunction · 0.90
index_help_test.tsFile · 0.90
index_init_test.tsFile · 0.90
setupTestProjectFunction · 0.90
examples_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected