Skip to content

Commit 20dd6f2

Browse files
committed
Fix tests
1 parent 6f36f92 commit 20dd6f2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/__test__/plugin-test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,21 @@ describe('draft-js-markdown-shortcuts-plugin', () => {
150150
data: {}
151151
}]
152152
};
153+
currentSelectionState = new SelectionState({
154+
anchorKey: 'item1',
155+
anchorOffset: 5,
156+
focusKey: 'item1',
157+
focusOffset: 5,
158+
isBackward: false,
159+
hasFocus: true
160+
});
153161
expect(subject()).to.equal('handled');
154162
expect(modifierSpy).to.have.been.calledOnce();
155163
expect(store.setEditorState).to.have.been.calledWith(newEditorState);
156164
};
157165
['one', 'two', 'three', 'four', 'five', 'six'].forEach((level) => {
158166
describe(`on header-${level}`, () => {
159-
it('inserts new empty block', testInsertNewBlock(`header-${level}`));
167+
it('inserts new empty block on end of header return', testInsertNewBlock(`header-${level}`));
160168
});
161169
});
162170
['ctrlKey', 'shiftKey', 'metaKey', 'altKey'].forEach((key) => {

0 commit comments

Comments
 (0)