fix: preserve setup diagnostics and clean Knip config
This commit is contained in:
@@ -125,6 +125,19 @@ describe("runtime configuration", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it("reports the configured string-array size limit", () => {
|
||||
const result = parseConfig({
|
||||
REA_INVESTIGATION_INPUT_ROOTS_JSON: JSON.stringify(
|
||||
Array.from({ length: 129 }, (_, index) => `/input/${String(index)}`),
|
||||
),
|
||||
});
|
||||
expect(result.ok).toBe(false);
|
||||
if (!result.ok)
|
||||
expect(result.error.message).toBe(
|
||||
"REA_INVESTIGATION_INPUT_ROOTS_JSON must encode at most 128 strings",
|
||||
);
|
||||
});
|
||||
|
||||
it("parses supported log levels and rejects unknown levels", () => {
|
||||
const configured = parseConfig({ REA_LOG_LEVEL: "debug" });
|
||||
expect(configured.ok && configured.value.logLevel).toBe("debug");
|
||||
|
||||
@@ -19,6 +19,10 @@ describe("setup installer failure projection", () => {
|
||||
["runtime_dependencies", "runtime_dependency_unavailable"],
|
||||
["unsupported_hopper_build", "unsupported_hopper_build"],
|
||||
["cancelled", "setup_cancelled"],
|
||||
["destination_exists", "destination_exists"],
|
||||
["mount", "mount_failed"],
|
||||
["bundle", "bundle_invalid"],
|
||||
["copy", "copy_failed"],
|
||||
] as const)("maps %s to %s", (reason, code) => {
|
||||
const result = setupInstallFailure(reason as HopperInstallFailureReason);
|
||||
expect(result).toMatchObject({ status: "failed", code });
|
||||
|
||||
Reference in New Issue
Block a user