Skip to content

Commit

Permalink
Merge pull request #22 from speechmarkdown/tucker-alpha
Browse files Browse the repository at this point in the history
Add special chars tests
  • Loading branch information
rmtuckerphx authored Jul 9, 2019
2 parents ff777ec + c6e8212 commit 433fe7a
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 433fe7a

Please sign in to comment.