mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Fixed tests for fields getters (seems like that native error messages can change)
This commit is contained in:
@@ -463,26 +463,11 @@ describe("PKPass", () => {
|
|||||||
|
|
||||||
describe("fields getters", () => {
|
describe("fields getters", () => {
|
||||||
it("should throw error if a type has not been defined", () => {
|
it("should throw error if a type has not been defined", () => {
|
||||||
expect(() => pass.primaryFields).toThrowError(
|
expect(() => pass.primaryFields).toThrowError(TypeError);
|
||||||
TypeError,
|
expect(() => pass.secondaryFields).toThrowError(TypeError);
|
||||||
"Cannot read properties of undefined (reading 'primaryFields')",
|
expect(() => pass.auxiliaryFields).toThrowError(TypeError);
|
||||||
);
|
expect(() => pass.headerFields).toThrowError(TypeError);
|
||||||
expect(() => pass.secondaryFields).toThrowError(
|
expect(() => pass.backFields).toThrowError(TypeError);
|
||||||
TypeError,
|
|
||||||
"Cannot read properties of undefined (reading 'secondaryFields')",
|
|
||||||
);
|
|
||||||
expect(() => pass.auxiliaryFields).toThrowError(
|
|
||||||
TypeError,
|
|
||||||
"Cannot read properties of undefined (reading 'auxiliaryFields')",
|
|
||||||
);
|
|
||||||
expect(() => pass.headerFields).toThrowError(
|
|
||||||
TypeError,
|
|
||||||
"Cannot read properties of undefined (reading 'headerFields')",
|
|
||||||
);
|
|
||||||
expect(() => pass.backFields).toThrowError(
|
|
||||||
TypeError,
|
|
||||||
"Cannot read properties of undefined (reading 'backFields')",
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should return an instance of FieldsArray if a type have been set", () => {
|
it("should return an instance of FieldsArray if a type have been set", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user