From 32c5c14e5389b6c1855bc4bd12df4e2264578cdf Mon Sep 17 00:00:00 2001 From: Balearica Date: Sat, 24 Sep 2022 19:30:10 -0700 Subject: [PATCH] Fixed unit tests --- tests/detect.test.js | 2 +- tests/recognize.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/detect.test.js b/tests/detect.test.js index ea445dd..535d432 100644 --- a/tests/detect.test.js +++ b/tests/detect.test.js @@ -24,7 +24,7 @@ describe('detect()', async () => { [ { name: 'cosmic.png', ans: { script: 'Latin' } }, ].forEach(async ({ name, ans: { script } }) => { - const { data: { script: s } } = await Tesseract.detect(`${IMAGE_PATH}/${name}`); + const { data: { script: s } } = await Tesseract.detect(`${IMAGE_PATH}/${name}`, undefined, OPTIONS); expect(s).to.be(script); }); }).timeout(TIMEOUT); diff --git a/tests/recognize.test.js b/tests/recognize.test.js index 81ebe4e..59ecd6f 100644 --- a/tests/recognize.test.js +++ b/tests/recognize.test.js @@ -36,7 +36,7 @@ describe('recognize()', () => { { format: 'jpg', image: SIMPLE_JPG_BASE64, ans: SIMPLE_TEXT }, ].forEach(({ format, image, ans }) => ( it(`recongize ${format} in base64`, async () => { - const { data: { text } } = await Tesseract.recognize(image); + const { data: { text } } = await Tesseract.recognize(image, undefined, OPTIONS); expect(text).to.be(ans); }).timeout(TIMEOUT) ));