mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 13:25:19 +00:00
Bundle: added another message to Messages
This commit is contained in:
@@ -22,7 +22,7 @@ describe("Bundle", () => {
|
||||
// @ts-expect-error
|
||||
expect(() => new Bundle()).toThrowError(
|
||||
Error,
|
||||
"Cannot build Bundle. MimeType is missing",
|
||||
Messages.BUNDLE.MIME_TYPE_MISSING,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export default class Bundle {
|
||||
|
||||
constructor(public mimeType: `${Mime.type}/${Mime.subtype}`) {
|
||||
if (!mimeType) {
|
||||
throw new Error("Cannot build Bundle. MimeType is missing");
|
||||
throw new Error(Messages.BUNDLE.MIME_TYPE_MISSING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ export const MODELS = {
|
||||
} as const;
|
||||
|
||||
export const BUNDLE = {
|
||||
MIME_TYPE_MISSING: "Cannot build Bundle. MimeType is missing",
|
||||
CLOSED: "Cannot add file. Bundle is closed.",
|
||||
} as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user