Skip to content

Commit db0a188

Browse files
committed
fix onchange test
1 parent ef68192 commit db0a188

File tree

1 file changed

+3
-2
lines changed
  • draft-js-plugins-editor/src/Editor/__test__

1 file changed

+3
-2
lines changed

draft-js-plugins-editor/src/Editor/__test__/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe('Editor', () => {
6666
onDragEnter: sinon.spy(),
6767
onEscape: sinon.spy(),
6868
onTab: sinon.spy(),
69+
onChange: sinon.spy(),
6970
},
7071
];
7172
const result = shallow(
@@ -84,8 +85,8 @@ describe('Editor', () => {
8485
expect(plugins[0].onEscape).has.been.calledOnce();
8586
result.node.props.onTab();
8687
expect(plugins[0].onTab).has.been.calledOnce();
87-
// result.node.props.onChange(editorState);
88-
// expect(onChange).has.been.calledOnce();
88+
result.node.props.onChange(editorState);
89+
expect(plugins[0].onChange).has.been.calledOnce();
8990
});
9091

9192
it('calls the handle-hooks of the plugin', () => {

0 commit comments

Comments
 (0)