fix(core): update
This commit is contained in:
12
test/test.ts
12
test/test.ts
@@ -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();
|
||||
|
Reference in New Issue
Block a user