@@ -177,3 +177,58 @@ describe('sections-standard end speak tag at end', () => {
177
177
} ) ;
178
178
179
179
} ) ;
180
+
181
+ describe ( 'sections-standard voice section on same line' , ( ) => {
182
+
183
+ const speech = new SpeechMarkdown ( ) ;
184
+
185
+ const markdown = dedent `
186
+ #[voice:'Brian'] Hey there, nice to meet you
187
+ ` ;
188
+
189
+ test ( 'converts to SSML - Amazon Alexa' , ( ) => {
190
+
191
+ const options = {
192
+ platform : 'amazon-alexa'
193
+ } ;
194
+ const ssml = speech . toSSML ( markdown , options ) ;
195
+
196
+ const expected = dedent `
197
+ <speak>
198
+
199
+ <voice name="Brian"> Hey there, nice to meet you</voice>
200
+
201
+ </speak>
202
+ ` ;
203
+
204
+ expect ( ssml ) . toBe ( expected ) ;
205
+ } ) ;
206
+
207
+ test ( 'converts to SSML - Google Assistant' , ( ) => {
208
+
209
+ const options = {
210
+ platform : 'google-assistant'
211
+ } ;
212
+ const ssml = speech . toSSML ( markdown , options ) ;
213
+
214
+ const expected = dedent `
215
+ <speak>
216
+ Hey there, nice to meet you
217
+ </speak>
218
+ ` ;
219
+
220
+ expect ( ssml ) . toBe ( expected ) ;
221
+ } ) ;
222
+
223
+ test ( 'converts to Plain Text' , ( ) => {
224
+
225
+ const options = {
226
+ } ;
227
+ const text = speech . toText ( markdown , options ) ;
228
+
229
+ const expected = ' Hey there, nice to meet you' ;
230
+
231
+ expect ( text ) . toBe ( expected ) ;
232
+ } ) ;
233
+
234
+ } ) ;
0 commit comments