mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
test: use independent diagnostics and filesystem oracles
This commit is contained in:
1 parent
b899c35419
commit
25f50eea02
4 files changed
+17
-32
No files matched your search
@@ -389,7 +389,7 @@ const providerSettingSelections = (
|
||||
];
|
||||
|
||||
/** Render what the registration comparison established without inferring its effective environment. */
|
||||
export const registrationEnvironmentDetail = (
|
||||
const registrationEnvironmentDetail = (
|
||||
client: string,
|
||||
{
|
||||
unrecorded,
|
||||
|
||||
@@ -4,12 +4,7 @@ import { expect, it } from "vitest";
|
||||
|
||||
import { createTestTempDirectory } from "../../tests/fixtures/temporaryDirectory.js";
|
||||
import { createDoctorHostFixture as host } from "./Doctor.fixture.js";
|
||||
import {
|
||||
registrationEnvironmentDetail,
|
||||
runDoctor,
|
||||
systemDoctorHost,
|
||||
type DoctorHost,
|
||||
} from "./Doctor.js";
|
||||
import { runDoctor, systemDoctorHost, type DoctorHost } from "./Doctor.js";
|
||||
|
||||
const inspection = (
|
||||
id: string,
|
||||
@@ -186,11 +181,12 @@ it("states each comparison result without a claim it did not establish", async (
|
||||
classification: "unknown",
|
||||
details: { effective_environment: "unknown" },
|
||||
});
|
||||
expect(check?.detail).toBe(
|
||||
registrationEnvironmentDetail("cursor", {
|
||||
unrecorded: [],
|
||||
differing: ["JAVA_HOME"],
|
||||
unresolved: ["GHIDRA_INSTALL_DIR"],
|
||||
}),
|
||||
expect(check?.detail).toContain(
|
||||
"what the server cursor starts receives is unknown",
|
||||
);
|
||||
expect(check?.detail).toContain("It records other values for JAVA_HOME.");
|
||||
expect(check?.detail).toContain(
|
||||
"REA could not resolve its GHIDRA_INSTALL_DIR.",
|
||||
);
|
||||
expect(check?.detail).not.toContain("does not record");
|
||||
});
|
||||
@@ -1010,7 +1010,7 @@ describe("decompile_all partial results", () => {
|
||||
if (!result.ok)
|
||||
expect(result.error.userMessage).toContain("before address start");
|
||||
expect(calls).toHaveLength(0);
|
||||
await expect(readFile(directory())).rejects.toThrow();
|
||||
await expect(stat(directory())).rejects.toMatchObject({ code: "ENOENT" });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user