diff --git a/src/tests/plaintext.spec.js b/src/tests/plaintext.spec.js index fdd68fa0eb4..e3f60e48fd1 100644 --- a/src/tests/plaintext.spec.js +++ b/src/tests/plaintext.spec.js @@ -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") + }) })