Fixed tests for iOS 26

This commit is contained in:
Alexander Cerutti
2025-09-23 22:59:55 +02:00
parent 95983ffc84
commit ad8fc8c997

View File

@@ -1276,7 +1276,7 @@ describe("PKPass", () => {
});
});
describe("eventTicket new layout", () => {
describe("iOS 18 / iOS 26 new layouts", () => {
it("should contain preferredStyleSchemes if coming from an imported pass json", () => {
const passjson = modelFiles["pass.json"];
const changedPassJson = Buffer.from(
@@ -1355,16 +1355,16 @@ describe("PKPass", () => {
});
});
it("preferredStyleSchemes setter should throw if pass is not an eventTicket", () => {
pkpass.type = "boardingPass";
it("preferredStyleSchemes setter should throw if pass is not an eventTicket or boardingPass", () => {
pkpass.type = "storeCard";
expect(() => {
pkpass.preferredStyleSchemes = ["posterEventTicket", "eventTicket"];
}).toThrowError();
});
it("preferredStyleSchemes getter should throw if pass is not an eventTicket", () => {
pkpass.type = "boardingPass";
it("preferredStyleSchemes getter should throw if pass is not an eventTicket or boardingPass", () => {
pkpass.type = "storeCard";
expect(() => {
pkpass.preferredStyleSchemes;