diff --git a/packages/text-to-speech/test/htmlToSsml.test.ts b/packages/text-to-speech/test/htmlToSsml.test.ts
index b7e335341..55d058476 100644
--- a/packages/text-to-speech/test/htmlToSsml.test.ts
+++ b/packages/text-to-speech/test/htmlToSsml.test.ts
@@ -29,6 +29,36 @@ describe('htmlToSsml', () => {
)
})
})
+ describe('escaping', () => {
+ it('should convert to spaces', async () => {
+ const ssml = htmlToSsml(`
+
+ `, TEST_OPTIONS
+ )
+ const text = ssml[0].textItems.join('').trim()
+ expect(text).to.equal(
+ `some space
`
+ )
+ })
+ it('should remove emojis', async () => {
+ const ssml = htmlToSsml(`
+
+ `, TEST_OPTIONS
+ )
+ const text = ssml[0].textItems.join('').trim()
+ expect(text).to.equal(
+ `no emoji here
`
+ )
+ })
+ })
describe('a file with nested elements', () => {
it('should collapse spans into the parent paragraph', async () => {
const ssml = htmlToSsml(`
@@ -178,6 +208,38 @@ describe('htmlToSsml', () => {
)
})
})
+ describe('a file with lists', () => {
+ it('should convert a ul to and ', async () => {
+ const ssml = htmlToSsml(`
+
+ `, TEST_OPTIONS
+ )
+ const text = ssml[0].textItems.join('').trim()
+ expect(text).to.equal(
+ `
first itemsecond item
`.trim()
+ )
+ })
+ it('should convert a ol to and ', async () => {
+ const ssml = htmlToSsml(`
+
+
+
- first item
- second item
+
+
+
+ `, TEST_OPTIONS
+ )
+ const text = ssml[0].textItems.join('').trim()
+ expect(text).to.equal(
+ `
first itemsecond item
`.trim()
+ )
+ })
+ })
// For local testing:
// describe('readability test files', () => {
// it('should convert Html to SSML without throwing', async () => {