mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-30 05:21:08 +01:00
Switch deprecated editor.document -> editor.notebook (#151530)
This commit is contained in:
@@ -75,11 +75,11 @@ import * as utils from '../utils';
|
||||
const uri = await utils.createRandomFile(undefined, undefined, '.nbdtest');
|
||||
|
||||
const editor = await vscode.window.showNotebookDocument(uri);
|
||||
assert.strictEqual(uri.toString(), editor.document.uri.toString());
|
||||
assert.strictEqual(uri.toString(), editor.notebook.uri.toString());
|
||||
|
||||
assert.strictEqual(notebookDocumentsFromOnDidOpen.has(editor.document), true);
|
||||
assert.strictEqual(notebookDocumentsFromOnDidOpen.has(editor.notebook), true);
|
||||
|
||||
const includes = vscode.workspace.notebookDocuments.includes(editor.document);
|
||||
const includes = vscode.workspace.notebookDocuments.includes(editor.notebook);
|
||||
assert.strictEqual(true, includes);
|
||||
|
||||
sub.dispose();
|
||||
@@ -104,7 +104,7 @@ import * as utils from '../utils';
|
||||
const resource = await utils.createRandomFile(undefined, undefined, '.nbdtest');
|
||||
const editor = await vscode.window.showNotebookDocument(resource);
|
||||
assert.ok(await openedEditor);
|
||||
assert.strictEqual(editor.document.uri.toString(), resource.toString());
|
||||
assert.strictEqual(editor.notebook.uri.toString(), resource.toString());
|
||||
});
|
||||
|
||||
test('Active/Visible Editor', async function () {
|
||||
|
||||
Reference in New Issue
Block a user