From 90e192240ab0166effd9fadd1ecb80841dcf0dc2 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sun, 15 Nov 2026 23:12:16 +0800 Subject: [PATCH] test(ghidra): expect malformed language XML as a malformed ParseFailure (#11234) --- .../filesystem/ghidraLanguageCatalogEncoding.test.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/boundary/filesystem/ghidraLanguageCatalogEncoding.test.ts b/tests/boundary/filesystem/ghidraLanguageCatalogEncoding.test.ts index 2b7e5153a8..6053ddca1c 100644 --- a/tests/boundary/filesystem/ghidraLanguageCatalogEncoding.test.ts +++ b/tests/boundary/filesystem/ghidraLanguageCatalogEncoding.test.ts @@ -31,17 +31,17 @@ it.each([ '">', ), ]), - expectedError: "invalid-bytes", + expectedError: { reason: "invalid-bytes" }, }, { name: "encoding mismatch", bytes: Buffer.from('' + xml), - expectedError: "encoding-mismatch", + expectedError: { reason: "encoding-mismatch" }, }, { name: "malformed XML alongside U+FFFD", bytes: Buffer.from(xml.replace('id="toy:LE:32:default"', "id=unquoted")), - expectedError: "malformed", + expectedError: { _tag: "ParseFailureError", kind: "malformed" }, }, ])( "reads $name at the language-file byte boundary", @@ -64,8 +64,6 @@ it.each([ else await expect( readGhidraLanguageCatalog(root, new ArtifactResourceScope()), - ).rejects.toMatchObject({ - reason: expectedError, - }); + ).rejects.toMatchObject(expectedError); }, );