Files
reverse-engineering-anything/tests/acceptance/applications/electronBlankPathCli.test.ts
T
84990f9777 test: remove fixed child-process deadlines from tests
239 literal timeoutMs values on cli.run and processes.run only restated
a guess at host speed. On hosted runners with four workers, cliOutput's
3-second value failed while the command still produced correct output.
Deadlines that are the behavior under test, derived from an operation
budget, or that bound a regression's wait remain.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:21:13 +08:00

32 lines
920 B
TypeScript

import { expect } from "vitest";
import { cliTest } from "../../support/cli/cliFixture.js";
cliTest.for(["", " \t "])(
"rejects blank Electron application_root (%j) as invalid input",
async (applicationRoot, { cli }) => {
const response = await cli.run({
arguments: [
"capture-electron-scenario",
JSON.stringify({
executable_path: "/synthetic/missing-electron",
application_path: "/synthetic/missing-app",
application_root: applicationRoot,
}),
"--json",
],
environment: { REA_LOG_LEVEL: "silent" },
});
expect(response.exitCode).toBe(1);
expect(response.json).toMatchObject({
code: "invalid_request",
details: {
operation: "capture_electron_scenario",
issues: expect.arrayContaining([
expect.objectContaining({ path: ["application_root"] }),
]),
},
});
},
);