refactor: return complete analysis results inline
This commit is contained in:
@@ -36,7 +36,7 @@ describe("Ghidra local transport", () => {
|
||||
const path = join(root, "bridge-endpoint.json");
|
||||
await writeFile(
|
||||
path,
|
||||
`${JSON.stringify({ schema_version: 1, host: "127.0.0.1", port: 49152 })}\n`,
|
||||
`${JSON.stringify({ host: "127.0.0.1", port: 49152 })}\n`,
|
||||
);
|
||||
|
||||
await expect(
|
||||
@@ -51,9 +51,9 @@ describe("Ghidra local transport", () => {
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ schema_version: 1, host: "0.0.0.0", port: 49152 },
|
||||
{ schema_version: 1, host: "127.0.0.1", port: 0 },
|
||||
{ schema_version: 1, host: "127.0.0.1", port: 49152, token: "leak" },
|
||||
{ host: "0.0.0.0", port: 49152 },
|
||||
{ host: "127.0.0.1", port: 0 },
|
||||
{ host: "127.0.0.1", port: 49152, token: "leak" },
|
||||
])(
|
||||
"rejects an invalid or expanded TCP endpoint: $host:$port",
|
||||
async (value) => {
|
||||
|
||||
@@ -101,7 +101,6 @@ class ExitingLauncher implements BridgeLauncher {
|
||||
class DiagnosticExitingLauncher implements BridgeLauncher {
|
||||
launch() {
|
||||
const diagnostic: HopperStartupDiagnostic = {
|
||||
schema_version: 1,
|
||||
component: "hopper_private_display",
|
||||
operation: "launch",
|
||||
status: "error",
|
||||
|
||||
@@ -39,7 +39,6 @@ type DiagnosticOverrides = Partial<
|
||||
|
||||
const diagnostic = (overrides: DiagnosticOverrides = {}) => {
|
||||
const common = {
|
||||
schema_version: 1,
|
||||
component: "hopper_private_display",
|
||||
operation: "probe",
|
||||
reason: "ready",
|
||||
|
||||
@@ -52,7 +52,9 @@ describe("managed static provider path boundary", () => {
|
||||
);
|
||||
expect(boundaries.ok).toBe(true);
|
||||
if (!boundaries.ok) return;
|
||||
expect(asManagedNativeBoundaryResult(boundaries.value)).toMatchObject({
|
||||
const boundaryResult = asManagedNativeBoundaryResult(boundaries.value);
|
||||
expect(boundaryResult).not.toHaveProperty("schema_version");
|
||||
expect(boundaryResult).toMatchObject({
|
||||
artifact: { path, sha256: parsed.value.sha256, format: "pe" },
|
||||
module_refs: [],
|
||||
pinvoke_imports: [],
|
||||
|
||||
@@ -508,7 +508,6 @@ describe("controlled JavaScript replay cancellation and export", () => {
|
||||
const metadata = await stat(path);
|
||||
expect(metadata.mode & 0o777).toBe(0o600);
|
||||
expect(JSON.parse(await readFile(path, "utf8"))).toMatchObject({
|
||||
schema_version: 1,
|
||||
sources: null,
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user