Can't get tests to run with local bits, try submitting
parent
8f345dea8e
commit
416ad2cbc6
|
@ -266,14 +266,16 @@ const apiTestContentProvider: vscode.NotebookContentProvider = {
|
|||
const version = editor.notebook.version;
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
const cellEdit = vscode.NotebookEdit.replaceCells(new vscode.NotebookRange(1, 0), [{ kind: vscode.NotebookCellKind.Code, languageId: 'javascript', value: 'test 2', outputs: [], metadata: undefined }]);
|
||||
const cellMetadataEdit = vscode.NotebookEdit.updateCellMetadata(0, { inputCollapsed: false });
|
||||
const metdataEdit = vscode.NotebookEdit.updateNotebookMetadata({ testMetadata: false });
|
||||
const cellMetadataEdit = vscode.NotebookEdit.updateCellMetadata(0, { extraCellMetadata: true });
|
||||
const metdataEdit = vscode.NotebookEdit.updateNotebookMetadata({ ...notebook.metadata, custom: { ...(notebook.metadata.custom || {}), extraNotebookMetadata: true } });
|
||||
edit.set(notebook.uri, [cellEdit, cellMetadataEdit, metdataEdit]);
|
||||
await vscode.workspace.applyEdit(edit);
|
||||
await notebookChangeEvent;
|
||||
|
||||
assert.strictEqual(version + 1, editor.notebook.version);
|
||||
assert.strictEqual(cellMetadataEdit.newCellMetadata, editor.notebook.cellAt(0).metadata);
|
||||
assert.strictEqual(metdataEdit.newNotebookMetadata, editor.notebook.metadata);
|
||||
const cell = editor.notebook.cellAt(0);
|
||||
assert.ok(editor.notebook.metadata.custom.extraNotebookMetadata, `Test metadata not found`);
|
||||
assert.ok(cell.metadata.extraCellMetadata, `Test cell metdata not found`);
|
||||
});
|
||||
|
||||
test('edit API batch edits undo/redo', async function () {
|
||||
|
|
Loading…
Reference in New Issue