fix(core): update

This commit is contained in:
2022-10-26 23:04:59 +02:00
parent 67f21d2500
commit 65756457aa
10 changed files with 52 additions and 67 deletions

View File

@@ -39,17 +39,19 @@ tap.test('should create a valid PDFResult', async () => {
}
fs.writeFileSync(`.nogit/${fileName}`, pdfResult.buffer as Buffer);
};
await writePDfToDisk('https://maintainedby.lossless.com/', '1.pdf')
await writePDfToDisk('https://rendertron.lossless.one/render/https://layer.io', '2.pdf')
await writePDfToDisk('https://maintainedby.lossless.com/', '1.pdf');
await writePDfToDisk('https://rendertron.lossless.one/render/https://layer.io', '2.pdf');
});
tap.test('should combine pdfs', async () => {
const fs = await import('fs');
const pdf1 = await testSmartPdf.readFileToPdfObject('.nogit/1.pdf');
const pdf2 = await testSmartPdf.readFileToPdfObject('.nogit/2.pdf');
fs.writeFileSync(`.nogit/combined.pdf`, (await testSmartPdf.mergePdfs([pdf1, pdf2])).buffer as Buffer);
})
fs.writeFileSync(
`.nogit/combined.pdf`,
(await testSmartPdf.mergePdfs([pdf1, pdf2])).buffer as Buffer
);
});
tap.test('should be able to close properly', async () => {
await testSmartPdf.stop();