Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should redo a cell action', () => {
const count = widget.widgets.length;
const next = widget.widgets[1];
widget.select(next);
NotebookActions.deleteCells(widget);
NotebookActions.undo(widget);
NotebookActions.redo(widget);
expect(widget.widgets.length).to.equal(count - 2);
});
it('should switch the widget to command mode', () => {
widget.mode = 'edit';
NotebookActions.undo(widget);
expect(widget.mode).to.equal('command');
});
execute: () => NotebookActions.undo(nbWidget.content)
});
execute: () => NotebookActions.undo(nbWidget.content)
});
execute: () => NotebookActions.undo(nbWidget.content)
});
execute: args => {
const current = getCurrent(args);
if (current) {
return NotebookActions.undo(current.notebook);
}
},
isEnabled
execute: args => {
const current = getCurrent(args);
if (current) {
return NotebookActions.undo(current.content);
}
},
isEnabled
execute: () => NotebookActions.undo(nbWidget.notebook)
});
execute: args => {
const current = getCurrent(args);
if (current) {
return NotebookActions.undo(current.notebook);
}
},
isEnabled
execute: () => NotebookActions.undo(nbWidget.content)
});