Closed spekulatif1 closed 6 months ago
I've a test case, which downloads a pdf file from a url then parses and validates result. Sample code is below, but it doesn't work or crashes either.
const request = require('request'); const PDFParser = require("pdf2json"); const pdfParser = new PDFParser(); it('should validate pdf', (done) => { request .get(url) .pipe(pdfParser) pdfParser.on("pdfParser_dataError", errData => done(errData)); pdfParser.on("pdfParser_dataReady", pdfData => { expect(pdfData).toMatchSnapshot(); done() }); });
the same problem, could you solve it
jest replaced vows in 3.1.2, please ref ./test/test.cjs
I've a test case, which downloads a pdf file from a url then parses and validates result. Sample code is below, but it doesn't work or crashes either.