fix(core): update
This commit is contained in:
@ -37,7 +37,7 @@ tap.test('should create a valid PDFResult', async () => {
|
||||
if (!fs.existsSync('.nogit/')) {
|
||||
fs.mkdirSync('.nogit/');
|
||||
}
|
||||
fs.writeFileSync(`.nogit/${fileName}`, pdfResult.buffer);
|
||||
fs.writeFileSync(`.nogit/${fileName}`, pdfResult.buffer as Buffer);
|
||||
};
|
||||
await writePDfToDisk('https://maintainedby.lossless.com/', '1.pdf')
|
||||
await writePDfToDisk('https://rendertron.lossless.one/render/https://fitnessloft.de/impressum/', '2.pdf')
|
||||
@ -45,9 +45,9 @@ tap.test('should create a valid PDFResult', async () => {
|
||||
|
||||
tap.test('should combine pdfs', async () => {
|
||||
const fs = await import('fs');
|
||||
const buffer1 = fs.readFileSync('.nogit/1.pdf');
|
||||
const buffer2 = fs.readFileSync('.nogit/2.pdf');
|
||||
fs.writeFileSync(`.nogit/combined.pdf`, await testSmartPdf.mergePdfBuffers([buffer1, buffer2]));
|
||||
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);
|
||||
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user