From cc2226930a31cdeb124f49a11dfb5317f3f9e720 Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Wed, 19 Apr 2023 22:25:32 +0200 Subject: [PATCH] Added better freezing check --- specs/PKPass.spec.cjs | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/specs/PKPass.spec.cjs b/specs/PKPass.spec.cjs index 66aad6f..cf621e6 100644 --- a/specs/PKPass.spec.cjs +++ b/specs/PKPass.spec.cjs @@ -388,11 +388,27 @@ describe("PKPass", () => { expect(backFields.length).toBe(0); }); - it("pkpass should get frozen once an export is done", () => { - pkpass.getAsRaw(); + describe("pkpass should get frozen once an export is done", () => { + it("getAsRaw", () => { + pkpass.getAsRaw(); - /** We might want to test all the methods, but methods might change... so should we? */ - expect(() => pkpass.localize("en", { a: "b" })).toThrowError(); + /** We might want to test all the methods, but methods might change... so should we? */ + expect(() => pkpass.localize("en", { a: "b" })).toThrowError(); + }); + + it("getAsBuffer", () => { + pkpass.getAsBuffer(); + + /** We might want to test all the methods, but methods might change... so should we? */ + expect(() => pkpass.localize("en", { a: "b" })).toThrowError(); + }); + + it("getAsStream", () => { + pkpass.getAsStream(); + + /** We might want to test all the methods, but methods might change... so should we? */ + expect(() => pkpass.localize("en", { a: "b" })).toThrowError(); + }); }); describe("localize and languages", () => {