Skip to content

Commit

Permalink
Tests: CC
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Feb 11, 2022
1 parent 01f1b1f commit 044d668
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/inspector/components/seteditordatabutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,22 @@ describe( '<SetEditorDataButton />', () => {
editorDataValue: '<p>foo</p>'
} );
} );

it( 'should do nothing special on Enter ', () => {
const setDataSpy = sinon.spy( editor, 'setData' );
const evt = {
key: 'Enter'
};

textarea.simulate( 'keyPress', evt );

sinon.assert.notCalled( setDataSpy );

expect( wrapper.state() ).to.deep.equal( {
isModalOpen: true,
editorDataValue: '<p>foo</p>'
} );
} );
} );

describe( 'load data button', () => {
Expand Down

0 comments on commit 044d668

Please sign in to comment.