feat(electron): map static process and IPC boundaries
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
startFakeCdpBrowser,
|
||||
type FakeCdpBrowser,
|
||||
} from "./fixtures/fakeCdpBrowser.js";
|
||||
import { writeElectronBoundaryFixture } from "./fixtures/electronBoundaryApplication.js";
|
||||
|
||||
const execute = promisify(execFile);
|
||||
const INTEGRATION_TEST_TIMEOUT_MS = 20_000;
|
||||
@@ -82,6 +83,38 @@ describe("Electron CLI parity", () => {
|
||||
},
|
||||
INTEGRATION_TEST_TIMEOUT_MS,
|
||||
);
|
||||
|
||||
it(
|
||||
"returns the static JavaScript application Evidence contract",
|
||||
async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), "rea-electron-static-cli-"));
|
||||
temporary.push(root);
|
||||
await writeElectronBoundaryFixture(root);
|
||||
const environment = {
|
||||
...process.env,
|
||||
REA_INVESTIGATION_INPUT_ROOTS_JSON: JSON.stringify([root]),
|
||||
};
|
||||
|
||||
const analyzed = await runCli(
|
||||
["analyze-javascript-application", root, "--approved", "--json"],
|
||||
environment,
|
||||
);
|
||||
|
||||
expect(analyzed).toMatchObject({
|
||||
operation: "analyze_javascript_application",
|
||||
provider: { id: "rea-javascript-application" },
|
||||
normalized_result: {
|
||||
input_path: root,
|
||||
summary: {
|
||||
browser_windows: 3,
|
||||
context_bridge_apis: 2,
|
||||
ipc: { paired_renderer_transmissions: 4 },
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
INTEGRATION_TEST_TIMEOUT_MS,
|
||||
);
|
||||
});
|
||||
|
||||
const runCli = async (
|
||||
|
||||
Reference in New Issue
Block a user