pdf-to-png-converter
pdf-to-png-converter copied to clipboard
Segmentation fault in combination wtih `jest`
Current Behaviour
As far as I can see there is an issue when trying to run the package as part of a jest
test which results in a segmentation fault error, SIGSEGV
.
A minimal example is
import { pdfToPng } from 'pdf-to-png-converter';
export async function convertToPng() {
const pdfPath = 'test.pdf';
const pngPath = './test-conversion';
const options = {
outputFolder: pngPath,
};
await pdfToPng(pdfPath, options);
}
convertToPng();
Running
import { convertToPng } from './testPdfToPng';
describe('example', () => {
convertToPng();
});
via yarn jest testPdfToPng
results in error Command failed with signal "SIGSEGV".
While running it via ts-node path-to/testPdfToPng.ts
works fine and converts the pdf.
Environment
- Node.js v18.8.0
- OS: latest macOS M1