Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a13200b01d | ||
|
|
f3d4abd3eb | ||
|
|
8809be9343 | ||
|
|
3789d31e25 | ||
|
|
7628b0ad89 |
No files matched your search
+78
-918
File diff suppressed because it is too large.
Load diff
@@ -850,18 +850,18 @@ describe("application workflow CLI parity", () => {
|
||||
if (seed === undefined)
|
||||
throw new TypeError("Expected at least one semantic relation");
|
||||
|
||||
const traced = await runCli([
|
||||
const traced = await runCliWithRequestFile(
|
||||
root,
|
||||
"trace-javascript-semantics",
|
||||
JSON.stringify({
|
||||
{
|
||||
application: analyzed.value,
|
||||
query: {
|
||||
seed: { kind: "semantic-node", node_id: seed },
|
||||
direction: "forward-influence",
|
||||
include_ambiguous_dynamic_edges: true,
|
||||
},
|
||||
}),
|
||||
"--json",
|
||||
]);
|
||||
},
|
||||
);
|
||||
expect(traced).toMatchObject({
|
||||
operation: "trace_javascript_semantics",
|
||||
predicate_type: "rea.javascript-semantic-trace",
|
||||
@@ -1300,18 +1300,18 @@ describe("application workflow CLI export Evidence", () => {
|
||||
'export default async function make() { return { kind: "record", extra: 1 }; }',
|
||||
];
|
||||
const [left, right] = await analyzeComparisonSources(root, sources);
|
||||
const compared = await runCli([
|
||||
const compared = await runCliWithRequestFile(
|
||||
root,
|
||||
"compare-javascript-export-shapes",
|
||||
JSON.stringify({
|
||||
{
|
||||
left,
|
||||
right,
|
||||
left_module_path: "parser.mjs",
|
||||
left_export_name: "default",
|
||||
right_module_path: "parser.mjs",
|
||||
right_export_name: "default",
|
||||
}),
|
||||
"--json",
|
||||
]);
|
||||
},
|
||||
);
|
||||
expect(compared).toMatchObject({
|
||||
operation: "compare_javascript_export_shapes",
|
||||
normalized_result: {
|
||||
@@ -1640,3 +1640,19 @@ const runCli = async (
|
||||
throw cause;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Pass a request carrying complete Evidence through the CLI's file-backed JSON
|
||||
* input. Serialized Evidence exceeds the Windows command-line limit when it is
|
||||
* passed as one argument, so spawn fails with ENAMETOOLONG before the workflow
|
||||
* starts. Inline JSON transport keeps its own coverage in the parity tests.
|
||||
*/
|
||||
const runCliWithRequestFile = async (
|
||||
root: string,
|
||||
command: string,
|
||||
request: unknown,
|
||||
): Promise<unknown> => {
|
||||
const requestPath = join(root, "request.json");
|
||||
await writeFile(requestPath, JSON.stringify(request));
|
||||
return runCli([command, requestPath, "--json"]);
|
||||
};
|
||||
Reference in new issue
Block a user