Skip to content

Commit

Permalink
feat: add more tests to normalizeCommentHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Mar 11, 2024
1 parent 7b454ae commit a32f702
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/transformers/normalize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,20 @@ describe('Normalization: Article', () => {
})

describe('Normalization: Comment', () => {
test('quote', () => {
expectNormalizeCommentHTML(
'<blockquote><p>abc</p></blockquote>',
'<blockquote><p>abc</p></blockquote>',
)
})

test('link', () => {
expectNormalizeCommentHTML(
'<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://example.com">abc</a></p>',
'<p><a target="_blank" rel="noopener noreferrer nofollow" href="https://example.com">abc</a></p>',
)
})

test('bolds is not supported', () => {
expectNormalizeCommentHTML('<p><strong>abc</strong></p>', '<p>abc</p>')
expectNormalizeCommentHTML('<p><b>abc</b></p>', '<p>abc</p>')
Expand Down

0 comments on commit a32f702

Please sign in to comment.