Skip to content

Commit

Permalink
test(content): Test whitespace removal at start and end of editables
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbachmann committed Dec 15, 2021
1 parent 4e1deba commit e4c7383
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/content.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ describe('Content', function () {
content.normalizeTags(actual)
expect(actual.innerHTML).to.equal(expected.innerHTML)
})

it('removes whitespaces at the start and end', function () {
const elem = createElement('<div> Hello <strong>world</strong>&nbsp; &nbsp;</div>')
content.normalizeTags(elem)
expect(elem.innerHTML).to.equal('Hello <strong>world</strong>')
})
})

describe('normalizeWhitespace()', function () {
Expand Down

0 comments on commit e4c7383

Please sign in to comment.