Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
susanwere committed Aug 1, 2023
1 parent 812ff10 commit c687d1b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,10 @@ describe('paste-markdown', function () {
it('pastes markdown with link labels that contains special characters in html', function () {
// eslint-disable-next-line github/unescaped-html-literal
const sentence = `<meta charset='utf-8'>
<a href="https://www.abcxyz.org/">foo bar</a> <a href="https://example.com/?q=foo&bar=baz">foo&bar</a>`
const plaintextSentence = 'foo bar foo&bar'
const markdownSentence = '[foo bar](https://www.abcxyz.org/) [foo&bar](https://example.com/?q=foo&bar=baz)'
<p>foo&bar <a href="https://www.abcxyz.org/">foo bar</a> <a href="https://example.com/?q=foo&bar=baz">foo&bar</a></p>`
const plaintextSentence = 'foo&bar foo bar foo&bar'
const markdownSentence =
'foo&bar [foo bar](https://www.abcxyz.org/) [foo&bar](https://example.com/?q=foo&bar=baz)'

paste(textarea, {'text/html': sentence, 'text/plain': plaintextSentence})
assert.equal(textarea.value, markdownSentence)
Expand Down

0 comments on commit c687d1b

Please sign in to comment.