mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Removed in-code tests ad-hoc code
This commit is contained in:
@@ -10,14 +10,13 @@ import * as Strings from "./StringsUtils";
|
|||||||
import * as Utils from "./utils";
|
import * as Utils from "./utils";
|
||||||
import * as Messages from "./messages";
|
import * as Messages from "./messages";
|
||||||
|
|
||||||
/** Exporting for tests specs */
|
const propsSymbol = Symbol("props");
|
||||||
export const propsSymbol = Symbol("props");
|
const localizationSymbol = Symbol("pass.l10n");
|
||||||
export const localizationSymbol = Symbol("pass.l10n");
|
const importMetadataSymbol = Symbol("import.pass.metadata");
|
||||||
export const importMetadataSymbol = Symbol("import.pass.metadata");
|
const createManifestSymbol = Symbol("pass.manifest");
|
||||||
export const createManifestSymbol = Symbol("pass.manifest");
|
const closePassSymbol = Symbol("pass.close");
|
||||||
export const closePassSymbol = Symbol("pass.close");
|
const passTypeSymbol = Symbol("pass.type");
|
||||||
export const passTypeSymbol = Symbol("pass.type");
|
const certificatesSymbol = Symbol("pass.certificates");
|
||||||
export const certificatesSymbol = Symbol("pass.certificates");
|
|
||||||
|
|
||||||
const RegExps = {
|
const RegExps = {
|
||||||
PASS_JSON: /pass\.json/,
|
PASS_JSON: /pass\.json/,
|
||||||
@@ -597,9 +596,7 @@ export default class PKPass extends Bundle {
|
|||||||
* signature files
|
* signature files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private [closePassSymbol](
|
private [closePassSymbol]() {
|
||||||
__test_disable_manifest_signature_generation__: boolean = false,
|
|
||||||
) {
|
|
||||||
if (!this.type) {
|
if (!this.type) {
|
||||||
throw new TypeError(Messages.CLOSE.MISSING_TYPE);
|
throw new TypeError(Messages.CLOSE.MISSING_TYPE);
|
||||||
}
|
}
|
||||||
@@ -673,10 +670,6 @@ export default class PKPass extends Bundle {
|
|||||||
// *** SIGNATURE AND MANIFEST *** //
|
// *** SIGNATURE AND MANIFEST *** //
|
||||||
// ****************************** //
|
// ****************************** //
|
||||||
|
|
||||||
if (__test_disable_manifest_signature_generation__) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const manifestBuffer = this[createManifestSymbol]();
|
const manifestBuffer = this[createManifestSymbol]();
|
||||||
super.addBuffer("manifest.json", manifestBuffer);
|
super.addBuffer("manifest.json", manifestBuffer);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user