@pdfme/generator 3.1.5-dev.8 → 3.1.5-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,6 +83,7 @@ exports.business = {
83
83
  履歴書,
84
84
  労働条件通知書,
85
85
  };
86
+ // These tests are slower, so we allow more time for them to pass
86
87
  exports.textType = {
87
88
  dynamicFontSizeHorizontal,
88
89
  dynamicFontSizeVertical,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../__tests__/assets/templates/index.ts"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAa,CAAC;AAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAa,CAAC;AAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAa,CAAC;AAChD,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAa,CAAC;AACpE,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAa,CAAC;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAa,CAAC;AAC9D,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAa,CAAC;AACxD,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAa,CAAC;AACxD,MAAM,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CAAC;AACtF,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAa,CAAC;AACxD,MAAM,oBAAoB,GAAG,OAAO,CAAC,6BAA6B,CAAa,CAAC;AAChF,MAAM,uBAAuB,GAAG,OAAO,CAAC,gCAAgC,CAAa,CAAC;AACtF,MAAM,uBAAuB,GAAG,OAAO,CAAC,gCAAgC,CAAa,CAAC;AACtF,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAa,CAAC;AAEnC,QAAA,KAAK,GAAG;IACnB,IAAI;IACJ,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,cAAc;IACd,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,WAAW;IACX,QAAQ;IACR,UAAU;CACX,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,GAAG;IACH,KAAK;IACL,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,GAAG;IACH,OAAO;CACR,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEW,QAAA,KAAK,GAAG;IACnB,IAAI;IACJ,WAAW;IACX,SAAS;IACT,UAAU;IACV,QAAQ;CACT,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../__tests__/assets/templates/index.ts"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAa,CAAC;AAC1D,MAAM,SAAS,GAAG,OAAO,CAAC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G;IACtB,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,GAAG;IACH,KAAK;IACL,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,GAAG;IACH,OAAO;CACR,CAAC;AAEF,iEAAiE;AACpD,QAAA,QAAQ,GAAG;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEW,QAAA,KAAK,GAAG;IACnB,IAAI;IACJ,WAAW;IACX,SAAS;IACT,UAAU;IACV,QAAQ;CACT,CAAC"}
@@ -30,7 +30,8 @@ describe('generate integration test(label, envelope)', () => {
30
30
  options: { font },
31
31
  });
32
32
  const hrend = process.hrtime(hrstart);
33
- expect(hrend[0]).toBeLessThanOrEqual(1);
33
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
34
+ expect(execSeconds).toBeLessThan(1.5);
34
35
  const tmpFile = (0, utils_1.getPdfTmpPath)(`${key}.pdf`);
35
36
  const assertFile = (0, utils_1.getPdfAssertPath)(`${key}.pdf`);
36
37
  (0, fs_1.writeFileSync)(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration1.test.js","sourceRoot":"","sources":["../../../__tests__/integration1.test.ts"],"names":[],"mappings":";;;;;AAAA,2BAAmC;AACnC,+DAAuC;AACvC,kDAAqD;AACrD,4CAA6C;AAC7C,mCAA2E;AAE3E,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,QAAQ,CAAC,IAAI,CAAC,CAAC,iBAAK,EAAE,oBAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;QACtD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;Q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,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -30,7 +30,8 @@ describe('generate integration test(barcode, business)', () => {
30
30
  options: { font },
31
31
  });
32
32
  const hrend = process.hrtime(hrstart);
33
- expect(hrend[0]).toBeLessThanOrEqual(1);
33
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
34
+ expect(execSeconds).toBeLessThan(2);
34
35
  const tmpFile = (0, utils_1.getPdfTmpPath)(`${key}.pdf`);
35
36
  const assertFile = (0, utils_1.getPdfAssertPath)(`${key}.pdf`);
36
37
  (0, fs_1.writeFileSync)(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration2.test.js","sourceRoot":"","sources":["../../../__tests__/integration2.test.ts"],"names":[],"mappings":";;;;;AAAA,2BAAmC;AACnC,+DAAuC;AACvC,kDAAuD;AACvD,4CAAuD;AACvD,mCAA2E;AAE3E,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;IAC5D,QAAQ,CAAC,IAAI,CAAC,CAAC,mBAAO,EAAE,oBAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;QACxD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1C,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAEnC,wCAAwC;YACxC,IAAI,CAAC,YAAY,GAAG,EAAE,EAAE,KAAK,IAAI,EAAE;gBACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAW,CAAC;gBAEpC,MAAM,IAAI,GAAG,IAAA,eAAO,GAAE,CAAC;gBACvB,IAAI,CAAC,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACrC,IAAI,CAAC,eAAe,CAAC,QAAQ,GAAG,KAA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AAE;iBAClB,CAAC,CAAC;gBAEH,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACtC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;gBACrD,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBAEpC,MAAM,OAAO,GAAG,IAAA,qBAAa,EAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,IAAA,wBAAgB,EAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAElD,IAAA,kBAAa,EAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAA,cAAM,EAAC,OAAO,CAAC,EAAE,IAAA,cAAM,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -8,8 +8,8 @@ const generate_1 = __importDefault(require("../src/generate"));
8
8
  const templates_1 = require("./assets/templates");
9
9
  const schemas_1 = require("@pdfme/schemas");
10
10
  const utils_1 = require("./utils");
11
- describe('generate integration test(textType, other)', () => {
12
- describe.each([templates_1.textType, templates_1.other])('%s', (templateData) => {
11
+ describe('generate integration test(other)', () => {
12
+ describe.each([templates_1.other])('%s', (templateData) => {
13
13
  const entries = Object.entries(templateData);
14
14
  for (let l = 0; l < entries.length; l += 1) {
15
15
  const [key, template] = entries[l];
@@ -30,7 +30,8 @@ describe('generate integration test(textType, other)', () => {
30
30
  options: { font },
31
31
  });
32
32
  const hrend = process.hrtime(hrstart);
33
- expect(hrend[0]).toBeLessThanOrEqual(1);
33
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
34
+ expect(execSeconds).toBeLessThan(1.5);
34
35
  const tmpFile = (0, utils_1.getPdfTmpPath)(`${key}.pdf`);
35
36
  const assertFile = (0, utils_1.getPdfAssertPath)(`${key}.pdf`);
36
37
  (0, fs_1.writeFileSync)(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration3.test.js","sourceRoot":"","sources":["../../../__tests__/integration3.test.ts"],"names":[],"mappings":";;;;;AAAA,2BAAmC;AACnC,+DAAuC;AACvC,kDAAqD;AACrD,4CAA6C;AAC7C,mCAA2E;AAE3E,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAQ,EAAE,iBAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;QACtD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1C,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAEnC,wCAAwC;YACxC,IAAI,CAAC,YAAY,GAAG,EAAE,EAAE,KAAK,IAAI,EAAE;gBACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAW,CAAC;gBAEpC,MAAM,IAAI,GAAG,IAAA,eAAO,GAAE,CAAC;gBACvB,IAAI,CAAC,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACrC,IAAI,CAAC,eAAe,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACtC,IAAI,CAAC,qBAAqB,CAAC,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC7C,aAAa;gB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AG,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;gBACrD,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAEtC,MAAM,OAAO,GAAG,IAAA,qBAAa,EAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,IAAA,wBAAgB,EAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAElD,IAAA,kBAAa,EAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAA,cAAM,EAAC,OAAO,CAAC,EAAE,IAAA,cAAM,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = require("fs");
7
+ const generate_1 = __importDefault(require("../src/generate"));
8
+ const templates_1 = require("./assets/templates");
9
+ const schemas_1 = require("@pdfme/schemas");
10
+ const utils_1 = require("./utils");
11
+ describe('generate integration test(slower)', () => {
12
+ describe.each([templates_1.textType])('%s', (templateData) => {
13
+ const entries = Object.entries(templateData);
14
+ for (let l = 0; l < entries.length; l += 1) {
15
+ const [key, template] = entries[l];
16
+ // eslint-disable-next-line no-loop-func
17
+ test(`snapshot ${key}`, async () => {
18
+ const inputs = template.sampledata;
19
+ const font = (0, utils_1.getFont)();
20
+ font.SauceHanSansJP.fallback = false;
21
+ font.SauceHanSerifJP.fallback = false;
22
+ font['NotoSerifJP-Regular'].fallback = false;
23
+ // @ts-ignore
24
+ font[template.fontName].fallback = true;
25
+ const hrstart = process.hrtime();
26
+ const pdf = await (0, generate_1.default)({
27
+ inputs,
28
+ template,
29
+ plugins: { text: schemas_1.text, image: schemas_1.image, ...schemas_1.barcodes },
30
+ options: { font },
31
+ });
32
+ const hrend = process.hrtime(hrstart);
33
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
34
+ expect(execSeconds).toBeLessThan(2.5);
35
+ const tmpFile = (0, utils_1.getPdfTmpPath)(`${key}.pdf`);
36
+ const assertFile = (0, utils_1.getPdfAssertPath)(`${key}.pdf`);
37
+ (0, fs_1.writeFileSync)(tmpFile, pdf);
38
+ const res = await Promise.all([(0, utils_1.getPdf)(tmpFile), (0, utils_1.getPdf)(assertFile)]);
39
+ const [a, e] = res;
40
+ expect(a.Pages).toEqual(e.Pages);
41
+ });
42
+ }
43
+ });
44
+ });
45
+ //# sourceMappingURL=integration4.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration4.test.js","sourceRoot":"","sources":["../../../__tests__/integration4.test.ts"],"names":[],"mappings":";;;;;AAAA,2BAAmC;AACnC,+DAAuC;AACvC,kDAA8C;AAC9C,4CAAuD;AACvD,mCAA2E;AAE3E,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;QAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1C,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAEnC,wCAAw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M,EAAC,OAAO,CAAC,EAAE,IAAA,cAAM,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -80,6 +80,7 @@ export const business = {
80
80
  履歴書,
81
81
  労働条件通知書,
82
82
  };
83
+ // These tests are slower, so we allow more time for them to pass
83
84
  export const textType = {
84
85
  dynamicFontSizeHorizontal,
85
86
  dynamicFontSizeVertical,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../__tests__/assets/templates/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC;AACpD,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAa,CAAC;AAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAa,CAAC;AAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAa,CAAC;AAChD,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAa,CAAC;AACpE,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAa,CAAC;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAa,CAAC;AAC9D,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAa,CAAC;AAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAa,CAAC;AACxD,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAa,CAAC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AAC,aAAa,CAAa,CAAC;AAEhD,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI;IACJ,UAAU;IACV,UAAU;IACV,WAAW;IACX,UAAU;IACV,cAAc;IACd,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,WAAW;IACX,QAAQ;IACR,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG;IACH,KAAK;IACL,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,KAAK;IACL,GAAG;IACH,OAAO;CACR,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI;IACJ,WAAW;IACX,SAAS;IACT,UAAU;IACV,QAAQ;CACT,CAAC"}
@@ -25,7 +25,8 @@ describe('generate integration test(label, envelope)', () => {
25
25
  options: { font },
26
26
  });
27
27
  const hrend = process.hrtime(hrstart);
28
- expect(hrend[0]).toBeLessThanOrEqual(1);
28
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
29
+ expect(execSeconds).toBeLessThan(1.5);
29
30
  const tmpFile = getPdfTmpPath(`${key}.pdf`);
30
31
  const assertFile = getPdfAssertPath(`${key}.pdf`);
31
32
  writeFileSync(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration1.test.js","sourceRoot":"","sources":["../../../__tests__/integration1.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AC;gBACrD,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAEtC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAElD,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -25,7 +25,8 @@ describe('generate integration test(barcode, business)', () => {
25
25
  options: { font },
26
26
  });
27
27
  const hrend = process.hrtime(hrstart);
28
- expect(hrend[0]).toBeLessThanOrEqual(1);
28
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
29
+ expect(execSeconds).toBeLessThan(2);
29
30
  const tmpFile = getPdfTmpPath(`${key}.pdf`);
30
31
  const assertFile = getPdfAssertPath(`${key}.pdf`);
31
32
  writeFileSync(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration2.test.js","sourceRoot":"","sources":["../../../__tests__/integration2.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,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,CAAC;gBAC5C,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAElD,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { writeFileSync } from 'fs';
2
2
  import generate from '../src/generate';
3
- import { textType, other } from './assets/templates';
3
+ import { other } from './assets/templates';
4
4
  import { text, image } from '@pdfme/schemas';
5
5
  import { getFont, getPdf, getPdfTmpPath, getPdfAssertPath } from './utils';
6
- describe('generate integration test(textType, other)', () => {
7
- describe.each([textType, other])('%s', (templateData) => {
6
+ describe('generate integration test(other)', () => {
7
+ describe.each([other])('%s', (templateData) => {
8
8
  const entries = Object.entries(templateData);
9
9
  for (let l = 0; l < entries.length; l += 1) {
10
10
  const [key, template] = entries[l];
@@ -25,7 +25,8 @@ describe('generate integration test(textType, other)', () => {
25
25
  options: { font },
26
26
  });
27
27
  const hrend = process.hrtime(hrstart);
28
- expect(hrend[0]).toBeLessThanOrEqual(1);
28
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
29
+ expect(execSeconds).toBeLessThan(1.5);
29
30
  const tmpFile = getPdfTmpPath(`${key}.pdf`);
30
31
  const assertFile = getPdfAssertPath(`${key}.pdf`);
31
32
  writeFileSync(tmpFile, pdf);
@@ -1 +1 @@
1
- {"version":3,"file":"integration3.test.js","sourceRoot":"","sources":["../../../__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C,CAAC,GAAG,UAAU,CAAC;gBACrD,MAAM,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBAEtC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAC5C,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC;gBAElD,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC5B,MAAM,GAAG,GAAQ,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { writeFileSync } from 'fs';
2
+ import generate from '../src/generate';
3
+ import { textType } from './assets/templates';
4
+ import { text, image, barcodes } from '@pdfme/schemas';
5
+ import { getFont, getPdf, getPdfTmpPath, getPdfAssertPath } from './utils';
6
+ describe('generate integration test(slower)', () => {
7
+ describe.each([textType])('%s', (templateData) => {
8
+ const entries = Object.entries(templateData);
9
+ for (let l = 0; l < entries.length; l += 1) {
10
+ const [key, template] = entries[l];
11
+ // eslint-disable-next-line no-loop-func
12
+ test(`snapshot ${key}`, async () => {
13
+ const inputs = template.sampledata;
14
+ const font = getFont();
15
+ font.SauceHanSansJP.fallback = false;
16
+ font.SauceHanSerifJP.fallback = false;
17
+ font['NotoSerifJP-Regular'].fallback = false;
18
+ // @ts-ignore
19
+ font[template.fontName].fallback = true;
20
+ const hrstart = process.hrtime();
21
+ const pdf = await generate({
22
+ inputs,
23
+ template,
24
+ plugins: { text, image, ...barcodes },
25
+ options: { font },
26
+ });
27
+ const hrend = process.hrtime(hrstart);
28
+ const execSeconds = hrend[0] + hrend[1] / 1000000000;
29
+ expect(execSeconds).toBeLessThan(2.5);
30
+ const tmpFile = getPdfTmpPath(`${key}.pdf`);
31
+ const assertFile = getPdfAssertPath(`${key}.pdf`);
32
+ writeFileSync(tmpFile, pdf);
33
+ const res = await Promise.all([getPdf(tmpFile), getPdf(assertFile)]);
34
+ const [a, e] = res;
35
+ expect(a.Pages).toEqual(e.Pages);
36
+ });
37
+ }
38
+ });
39
+ });
40
+ //# sourceMappingURL=integration4.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration4.test.js","sourceRoot":"","sources":["../../../__tests__/integration4.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3E,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,EAAE;QAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;YAC1C,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAEnC,wCAAwC;YACxC,IAAI,CAAC,YAAY,GAAG,EAAE,EAA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AAC,GAAG,GAAG,CAAC;gBACnB,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/generator",
3
- "version": "3.1.5-dev.8",
3
+ "version": "3.1.5-dev.9",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",