Skip to content

Commit

Permalink
Add special chars tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtuckerphx committed Jul 9, 2019
1 parent 11cf2fc commit c6e8212
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/modifier-text-allowed-chars.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,58 @@ describe.skip('modifier-text-allowed-chars minus sign', () => {
});

});

describe.skip('modifier-text-allowed-chars special chars', () => {

const speech = new SpeechMarkdown();

const markdown = dedent`
This is text with (parens) but this and other special characters: []()*~@#\\_!+- are ignored
`;

test('converts to SSML - Amazon Alexa', () => {

const options = {
platform: 'amazon-alexa'
};
const ssml = speech.toSSML(markdown, options);

const expected = dedent`
<speak>
This is text with (parens) but this and other special characters: []()*~@#\\_!+- are ignored
</speak>
`;

expect(ssml).toBe(expected);
});

test('converts to SSML - Google Assistant', () => {

const options = {
platform: 'google-assistant'
};
const ssml = speech.toSSML(markdown, options);

const expected = dedent`
<speak>
This is text with (parens) but this and other special characters: []()*~@#\\_!+- are ignored
</speak>
`;

expect(ssml).toBe(expected);
});

test('converts to Plain Text', () => {

const options = {
};
const text = speech.toText(markdown, options);

const expected = dedent`
This is text with (parens) but this and other special characters: []()*~@#\\_!+- are ignored
`;

expect(text).toBe(expected);
});

});

0 comments on commit c6e8212

Please sign in to comment.