From e5c215fb9d41bf27f0852914d22408c7747f605d Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 5 Oct 2022 10:34:51 +0800 Subject: [PATCH] Add test for long sentence --- packages/text-to-speech/test/htmlToSsml.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/text-to-speech/test/htmlToSsml.test.ts b/packages/text-to-speech/test/htmlToSsml.test.ts index 6f291ca86..3d2350378 100644 --- a/packages/text-to-speech/test/htmlToSsml.test.ts +++ b/packages/text-to-speech/test/htmlToSsml.test.ts @@ -254,4 +254,21 @@ describe('convert HTML to Speech file', () => { }) expect(speechFile.utterances).to.have.lengthOf(3) }) + + it('does not break long sentences', () => { + const html = `
+
+
+ This meeting did not offer any significant economic boosts, among other things it reviewed reports of the inspection teams sent to several provinces to check on implementation of economic stabilization measures, promised more administrative reforms, and cut toll fees for freight trucks by 10% and government-designated cargo port charges by 20% in Q4. +
+
+
+` + const speechFile = htmlToSpeechFile({ + content: html, + title: 'Test long sentence', + options: TEST_OPTIONS, + }) + expect(speechFile.utterances).to.have.lengthOf(2) + }) })