From bf1811bdbc580dfb11920f1d150cbc71fcbb8580 Mon Sep 17 00:00:00 2001 From: RRFZ <247457381+Plastic-time@users.noreply.github.com> Date: Mon, 9 Nov 2026 08:46:34 -0500 Subject: [PATCH] test(electron): expect the native path of an authorized ASAR file (#9549) --- src/browser/ElectronFileScope.cleanup.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/browser/ElectronFileScope.cleanup.test.ts b/src/browser/ElectronFileScope.cleanup.test.ts index 54fa57d25f..ab7670d6b1 100644 --- a/src/browser/ElectronFileScope.cleanup.test.ts +++ b/src/browser/ElectronFileScope.cleanup.test.ts @@ -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); });