MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / runTestFile

Function runTestFile

scripts/feishu/run-db-tests.mjs:114–141  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

112}
113
114function runTestFile(input) {
115 return new Promise((resolve) => {
116 const child = spawn(process.execPath, [
117 "--experimental-strip-types",
118 "--test",
119 "--test-concurrency=1",
120 input.file,
121 ], {
122 cwd: input.repositoryRoot,
123 env: input.env,
124 stdio: "inherit",
125 });
126 input.runtime.child = child;
127 child.once("exit", (code, signal) => {
128 input.runtime.child = undefined;
129 if (typeof code === "number") {
130 resolve(code);
131 return;
132 }
133 resolve(signal ? signalExitCode(signal) : 1);
134 });
135 child.once("error", (error) => {
136 input.runtime.child = undefined;
137 console.error(errorMessage(error));
138 resolve(1);
139 });
140 });
141}
142
143function parseArgs(args) {
144 return {

Callers 1

mainFunction · 0.85

Calls 2

signalExitCodeFunction · 0.85
errorMessageFunction · 0.70

Tested by

no test coverage detected