fix tests.

This commit is contained in:
rebornix
2020-08-31 12:16:35 -07:00
parent 23faaa293b
commit d3cfbddde1
2 changed files with 16 additions and 2 deletions

View File

@@ -67,8 +67,9 @@ export function smokeTestActivate(context: vscode.ExtensionContext): any {
}
}));
context.subscriptions.push(vscode.notebook.registerNotebookKernel('notebookSmokeTest', ['*.smoke-nb'], {
const kernel: vscode.NotebookKernel = {
label: 'notebookSmokeTest',
isPreferred: true,
executeAllCells: async (_document: vscode.NotebookDocument) => {
for (let i = 0; i < _document.cells.length; i++) {
_document.cells[i].outputs = [{
@@ -94,6 +95,12 @@ export function smokeTestActivate(context: vscode.ExtensionContext): any {
return;
},
cancelCellExecution: async () => { }
};
context.subscriptions.push(vscode.notebook.registerNotebookKernelProvider({ filenamePattern: '*.smoke-nb' }, {
provideKernels: async () => {
return [kernel];
}
}));
context.subscriptions.push(vscode.commands.registerCommand('vscode-notebook-tests.debugAction', async (cell: vscode.NotebookCell) => {