Skip to content

Commit

Permalink
test(plaintext) add regression test for newlines
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud authored and juliusknorr committed Nov 7, 2024
1 parent fd51a7c commit 52d09b1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/plaintext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,17 @@ describe('html as plain text', () => {
expect(plaintextThroughEditor('"\';&.-#><')).toBe('"\';&.-#><')
expect(plaintextThroughEditor(xssFuzzVectors)).toBe(xssFuzzVectors)
})
} )

describe('regression tests', () => {
test('tripple enter creates new lines at end (#6507)', () => {
const tiptap = createEditor({
enableRichEditing: false
})
tiptap.commands.enter()
tiptap.commands.enter()
tiptap.commands.enter()
expect(serializePlainText(tiptap))
.toEqual("\n\n\n")
})
})

0 comments on commit 52d09b1

Please sign in to comment.