test: tighten postinstall hotfix assertions

This commit is contained in:
Shakker
2026-05-11 06:17:01 +01:00
parent def356c4b0
commit c17b0e50e4

View File

@@ -254,9 +254,10 @@ describe("bundled plugin postinstall", () => {
].join("\n"),
);
expect(applyBaileysEncryptedStreamFinishHotfix({ packageRoot })).toMatchObject({
expect(applyBaileysEncryptedStreamFinishHotfix({ packageRoot })).toEqual({
applied: true,
reason: "patched",
targetPath: mediaFile,
});
const patchedText = await fs.readFile(mediaFile, "utf8");
expect(patchedText).toContain(
@@ -292,7 +293,7 @@ describe("bundled plugin postinstall", () => {
].join("\n"),
);
expect(applyBaileysEncryptedStreamFinishHotfix({ packageRoot })).toMatchObject({
expect(applyBaileysEncryptedStreamFinishHotfix({ packageRoot })).toEqual({
applied: false,
reason: "already_patched",
});