mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-09 11:51:15 +02:00
26 lines
801 B
TypeScript
26 lines
801 B
TypeScript
import { sign as signApplication, type SignOptions } from "@electron/osx-sign";
|
|
import { expect, it, vi } from "vite-plus/test";
|
|
|
|
import sign from "./sign-macos.ts";
|
|
|
|
vi.mock("@electron/osx-sign", () => ({ sign: vi.fn() }));
|
|
|
|
it("batches codesign calls without changing existing signing options", async () => {
|
|
const options = {
|
|
app: "/tmp/T3 Code.app",
|
|
identity: "Developer ID Application: T3 Tools, Inc.",
|
|
keychain: "/tmp/t3code.keychain",
|
|
provisioningProfile: "/tmp/t3code.provisionprofile",
|
|
optionsForFile: () => ({
|
|
entitlements: "/tmp/t3code.entitlements.plist",
|
|
hardenedRuntime: true,
|
|
}),
|
|
} satisfies SignOptions;
|
|
|
|
await sign(options);
|
|
|
|
expect(signApplication).toHaveBeenCalledExactlyOnceWith({
|
|
...options,
|
|
batchCodesignCalls: true,
|
|
});
|
|
});
|