Skip to content

Commit e4c7383

Browse files
committed
test(content): Test whitespace removal at start and end of editables
1 parent 4e1deba commit e4c7383

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/content.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ describe('Content', function () {
5858
content.normalizeTags(actual)
5959
expect(actual.innerHTML).to.equal(expected.innerHTML)
6060
})
61+
62+
it('removes whitespaces at the start and end', function () {
63+
const elem = createElement('<div> Hello <strong>world</strong>&nbsp; &nbsp;</div>')
64+
content.normalizeTags(elem)
65+
expect(elem.innerHTML).to.equal('Hello <strong>world</strong>')
66+
})
6167
})
6268

6369
describe('normalizeWhitespace()', function () {

0 commit comments

Comments
 (0)