test(electron): expect the native path of an authorized ASAR file (#9549)

This commit is contained in:
RRFZ authored and GitHub committed 2026-11-09 21:46:34 +08:00
1 parent 74201434e7
commit bf1811bdbc
1 file changed
+4 -4
@@ -237,7 +237,7 @@ it("keeps cancellation primary when ASAR close fails, then retries the same hand
expect(mapped?.cleanupPrimary?.cause).toBe(reason);
await expect(authorizedElectronFile(location)).resolves.toBe(
`${handleState.archive}/index.html`,
fileURLToPath(location),
);
expect(handleState.events).toEqual([
"open",
@@ -275,7 +275,7 @@ it("keeps an earlier read failure primary over a later abort and close failure",
expect(mapped?.cleanupPrimary?.cause).toBe(readFailure);
await expect(authorizedElectronFile(location)).resolves.toBe(
`${handleState.archive}/index.html`,
fileURLToPath(location),
);
expect(mapped?.cleanupIncomplete).toBe(false);
});
@@ -304,7 +304,7 @@ it("preserves an arbitrary cancellation reason observed during ASAR read", async
expect(mapped?.cleanupPrimary?.cause).toBe(reason);
await expect(authorizedElectronFile(location)).resolves.toBe(
`${handleState.archive}/index.html`,
fileURLToPath(location),
);
expect(mapped?.cleanupIncomplete).toBe(false);
});
@@ -333,7 +333,7 @@ it("preserves cancellation observed after ASAR stat when final close fails", asy
expect(mapped?.cleanupPrimary?.cause).toBe(reason);
await expect(authorizedElectronFile(location)).resolves.toBe(
`${handleState.archive}/index.html`,
fileURLToPath(location),
);
expect(mapped?.cleanupIncomplete).toBe(false);
});