Skip to content

Commit 016411a

Browse files
authored
Update proposed API for Notebooks (microsoft#15568)
* Update proposed API for Notebooks * News
1 parent 0894668 commit 016411a

5 files changed

Lines changed: 1159 additions & 1092 deletions

File tree

news/3 Code Health/15567.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updates to the VSCode Notebook API.

src/test/insiders/languageServer.insiders.test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ suite('Insiders Test: Language Server', () => {
8080
}
8181
}
8282
if (!tested) {
83-
assert.fail('Failled to test definitions');
83+
assert.fail('Failed to test definitions');
8484
}
8585
});
8686
test('Notebooks', async () => {
@@ -101,15 +101,15 @@ suite('Insiders Test: Language Server', () => {
101101
expect(activeEditor).not.to.be.equal(undefined, 'Active editor not found in notebook');
102102
await activeEditor!.edit((edit) => {
103103
edit.replaceCells(0, 0, [
104-
{
105-
cellKind: vscode.NotebookCellKind.Code,
106-
language: PYTHON_LANGUAGE,
107-
source: 'x = 4',
108-
metadata: {
104+
new vscode.NotebookCellData(
105+
vscode.NotebookCellKind.Code,
106+
PYTHON_LANGUAGE,
107+
'x = 4',
108+
[],
109+
new vscode.NotebookCellMetadata().with({
109110
hasExecutionOrder: false,
110-
},
111-
outputs: [],
112-
},
111+
}),
112+
),
113113
]);
114114
});
115115

@@ -124,15 +124,15 @@ suite('Insiders Test: Language Server', () => {
124124
await activeEditor!.edit((edit) => {
125125
edit.replaceCells(0, 1, []);
126126
edit.replaceCells(1, 0, [
127-
{
128-
cellKind: vscode.NotebookCellKind.Code,
129-
language: PYTHON_LANGUAGE,
130-
source: 'x = 4',
131-
metadata: {
127+
new vscode.NotebookCellData(
128+
vscode.NotebookCellKind.Code,
129+
PYTHON_LANGUAGE,
130+
'x = 4',
131+
[],
132+
new vscode.NotebookCellMetadata().with({
132133
hasExecutionOrder: false,
133-
},
134-
outputs: [],
135-
},
134+
}),
135+
),
136136
]);
137137
});
138138

0 commit comments

Comments
 (0)