mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
add test for HTML
This commit is contained in:
parent
868ac21f43
commit
b502d2ab23
1 changed files with 12 additions and 2 deletions
|
|
@ -63,8 +63,18 @@ describe('TextType', () => {
|
|||
text: '**Bold**',
|
||||
format: 'markdown'
|
||||
};
|
||||
const expectedOutput = '<strong>Bold</strong>';
|
||||
expect(TextType({ text: input })).toContain(expectedOutput);
|
||||
// TODO: investigate why the output has an extra newline
|
||||
const expectedOutput = '<strong>Bold</strong>\n';
|
||||
expect(TextType({ text: input })).toBe(expectedOutput);
|
||||
});
|
||||
|
||||
it('should format text with HTML correctly', () => {
|
||||
const input: TextFormat = {
|
||||
text: '<em>yes</em>',
|
||||
format: 'html'
|
||||
};
|
||||
const expectedOutput = '<em>yes</em>';
|
||||
expect(TextType({ text: input })).toBe(expectedOutput);
|
||||
});
|
||||
|
||||
it('should format plain text correctly', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue