Enable pdf export

This commit is contained in:
Dolan
2017-12-05 00:16:21 +00:00
parent fb08f79344
commit a6bba0bc6c
6 changed files with 56 additions and 13 deletions

View File

@ -1,3 +1,5 @@
/* tslint:disable:typedef space-before-function-paren */
import { assert } from "chai";
import * as fs from "fs";
@ -29,11 +31,10 @@ describe("Packer", () => {
});
describe("#pack()", () => {
/* tslint:disable */
it("should create a standard docx file", function (done) {
/* tslint:enable */
this.timeout(99999999);
packer.pack("build-tests/tests/test.docx");
packer.pack("build-tests/tests/test");
const int = setInterval(() => {
const stats = fs.statSync("build-tests/tests/test.docx");
if (stats.size > 2000) {
@ -51,5 +52,12 @@ describe("Packer", () => {
}
}, 2000);
});
it("should create a standard PDF file", async function () {
this.timeout(99999999);
await packer.packPdf("build-tests/tests/pdf-test");
fs.statSync("build-tests/tests/pdf-test.pdf");
});
});
});