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 run the selected cells ', async () => {
const next = widget.widgets[1] as MarkdownCell;
widget.select(next);
const cell = widget.activeCell as CodeCell;
cell.model.outputs.clear();
next.rendered = false;
const result = await NotebookActions.runAndAdvance(widget, session);
expect(result).to.equal(true);
expect(cell.model.outputs.length).to.be.above(0);
expect(next.rendered).to.equal(true);
}).timeout(30000); // Allow for slower CI
it('should stop executing code cells on an error', async () => {
widget.activeCell.model.value.text = ERROR_INPUT;
const cell = widget.model.contentFactory.createCodeCell({});
widget.model.cells.push(cell);
widget.select(widget.widgets[widget.widgets.length - 1]);
const result = await NotebookActions.runAndAdvance(widget, ipySession);
expect(result).to.equal(false);
expect(cell.executionCount).to.be.null;
await ipySession.kernel.restart();
}).timeout(30000); // Allow for slower CI
execute: () => {
NotebookActions.runAndAdvance(nbWidget.content, nbWidget.context.session);
}
});
execute: args => {
const current = getCurrent(args);
if (current) {
const { context, content } = current;
NotebookActions.runAndAdvance(content, context.session);
current.content.mode = 'edit';
}
},
isEnabled
execute: args => {
const current = getCurrent(args);
if (current) {
const { context, notebook } = current;
return NotebookActions.runAndAdvance(notebook, context.session);
}
},
isEnabled
execute: () => {
return NotebookActions.runAndAdvance(
nbWidget.content,
nbWidget.context.session
);
}
});
execute: args => {
const current = getCurrent(args);
if (current) {
const { context, content } = current;
return NotebookActions.runAndAdvance(content, context.session);
}
},
isEnabled
execute: () => {
NotebookActions.runAndAdvance(
nbWidget.content,
nbWidget.context.session
);
}
});
run: current => {
const { context, notebook } = current;
return NotebookActions.runAndAdvance(notebook, context.session)
.then(() => void 0);
},
runAll: current => {
run: current => {
const { context, notebook } = current;
return NotebookActions.runAndAdvance(notebook, context.session)
.then(() => void 0);
},
runAll: current => {