diff --git a/docs/src/demos/Nodes/CodeBlock/index.spec.js b/docs/src/demos/Nodes/CodeBlock/index.spec.js index eb9a770f7..2c55c483a 100644 --- a/docs/src/demos/Nodes/CodeBlock/index.spec.js +++ b/docs/src/demos/Nodes/CodeBlock/index.spec.js @@ -153,7 +153,7 @@ context('/demos/Nodes/CodeBlock', () => { }) }) - it.only('removes the code block when pressing backspace, even with blank lines', () => { + it.only('removes the code block when pressing backspace, even with blank lines', () => { cy.get('.ProseMirror').then(([{ editor }]) => { editor.commands.clearContent() @@ -167,4 +167,19 @@ context('/demos/Nodes/CodeBlock', () => { .should('not.exist') }) }) + + it.only('removes the code block when pressing backspace, even at start of document', () => { + cy.get('.ProseMirror').then(([{ editor }]) => { + editor.commands.clearContent() + + cy.get('.ProseMirror pre') + .should('not.exist') + + cy.get('.ProseMirror') + .type('``` A{leftArrow}{backspace}') + + cy.get('.ProseMirror pre') + .should('not.exist') + }) + }) })