Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

697 B
Raw Blame
import { expect, it, vi } from "vitest";
import { AnalysisCapabilityUnavailableError } from "../../domain/analysisErrorCore.js";
import { NodeCaptureAdapter } from "./NodeCaptureAdapter.js";

vi.mock("./CaptureRelease.js", async (original) => ({
  ...(await original<typeof import("./CaptureRelease.js")>()),
  NODE_CAPTURE_HEAP_ENFORCED: false,
  captureDecoderProcessMemoryLimitBytes: () => null,
}));

it.each(["saz", "qlog"] as const)(
  "refuses a %s worker when the runtime has no enforceable memory bound",
  async (format) => {
    await expect(
      new NodeCaptureAdapter(format).command("/owned/request.json"),
    ).rejects.toBeInstanceOf(AnalysisCapabilityUnavailableError);
  },
);