From 8224aeba9dd41f29ea6f8ef7ad7efa3f45fd4a6e Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 13 Oct 2026 04:24:34 +0800 Subject: [PATCH] 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. --- .../boundary/cli/referenceSourceImportStatus.test.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/boundary/cli/referenceSourceImportStatus.test.ts b/tests/boundary/cli/referenceSourceImportStatus.test.ts index 1f91e0801..7d309958f 100644 --- a/tests/boundary/cli/referenceSourceImportStatus.test.ts +++ b/tests/boundary/cli/referenceSourceImportStatus.test.ts @@ -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(