test(cli): align reference import failure envelopes
Expect ok:false and the preserved error payload in full-output mode, including Windows unsupported-host failures. Retain plain JSON, selected-path, remediation, permission, logging, and source-preservation coverage. Validation: focused compiled CLI output and reference-import tests; Windows-only cases await CI.
This commit is contained in:
parent
ac57c88efe
commit
8224aeba9d
|
|
@ -47,8 +47,8 @@ describe("compiled Windows reference-source import", () => {
|
|||
expect(result.json).toEqual(
|
||||
scenario.fullOutput
|
||||
? expect.objectContaining({
|
||||
ok: true,
|
||||
data: unsupportedHostOutput,
|
||||
ok: false,
|
||||
error: unsupportedHostOutput,
|
||||
})
|
||||
: unsupportedHostOutput,
|
||||
);
|
||||
|
|
@ -113,16 +113,14 @@ describe("compiled reference-source import preflight failures", () => {
|
|||
message: expect.stringContaining(rootReason),
|
||||
};
|
||||
if (scenario.fullOutput) {
|
||||
// Incur's legacy wrapper remains unchanged; operation status is
|
||||
// conveyed by the exit code and command log, not this `ok` field.
|
||||
expect(result.json).toMatchObject({
|
||||
ok: true,
|
||||
data: invalidRootOutput,
|
||||
ok: false,
|
||||
error: invalidRootOutput,
|
||||
});
|
||||
} else {
|
||||
expect(result.json).toMatchObject(invalidRootOutput);
|
||||
}
|
||||
const messagePath = scenario.fullOutput ? "data.message" : "message";
|
||||
const messagePath = scenario.fullOutput ? "error.message" : "message";
|
||||
expect(result.json).toHaveProperty(
|
||||
messagePath,
|
||||
expect.stringContaining(
|
||||
|
|
|
|||
Loading…
Reference in New Issue