context('clearContent', () => { before(() => { cy.visit('/examples/default') }) it('returns true for the clearContent command', () => { cy.get('.ProseMirror').then(([{ editor }]) => { editor.commands.setContent('
Example Text
') const command = editor.commands.clearContent() expect(command).to.be.eq(true) }) }) it('clears the content when using the clearContent command', () => { cy.get('.ProseMirror').then(([{ editor }]) => { editor.commands.setContent('Example Text
') editor.commands.clearContent() expect(editor.getHTML()).to.be.eq('') }) }) })