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 clear the outputs on all cells', () => {
const next = widget.widgets[1];
widget.select(next);
NotebookActions.clearAllOutputs(widget);
for (let i = 0; i < widget.widgets.length; i++) {
const cell = widget.widgets[i];
if (cell instanceof CodeCell) {
expect(cell.model.outputs.length).to.equal(0);
}
}
});
it('should clear the outputs on all cells', () => {
const next = widget.widgets[1];
widget.select(next);
NotebookActions.clearAllOutputs(widget);
for (let i = 0; i < widget.widgets.length; i++) {
const cell = widget.widgets[i];
if (cell instanceof CodeCell) {
expect(cell.model.outputs.length).to.equal(0);
}
}
});
execute: args => {
const current = getCurrent(args);
if (current) {
return NotebookActions.clearAllOutputs(current.notebook);
}
},
isEnabled
clearAll: (current: NotebookPanel) => {
return NotebookActions.clearAllOutputs(current.content);
}
} as IEditMenu.IClearer);
clear: (current: NotebookPanel) => {
return NotebookActions.clearAllOutputs(current.notebook);
}
} as IEditMenu.IClearer);
execute: () => NotebookActions.clearAllOutputs(nbWidget.content)
});
.then(() => { NotebookActions.clearAllOutputs(notebook); });
}
return current.session.restart().then(restarted => {
if (restarted) {
NotebookActions.clearAllOutputs(current.notebook);
}
return restarted;
});
},
return session.restart().then(() => {
NotebookActions.clearAllOutputs(content);
});
}
execute: args => {
const current = getCurrent(args);
if (current) {
return NotebookActions.clearAllOutputs(current.content);
}
},
isEnabled