pdf-to-png-converter icon indicating copy to clipboard operation
pdf-to-png-converter copied to clipboard

Segmentation fault in combination wtih `jest`

Open b-fa-ce opened this issue 4 months ago • 0 comments

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

b-fa-ce avatar Apr 16 '24 12:04 b-fa-ce