Switch deprecated editor.document -> editor.notebook (#151530)

This commit is contained in:
Rob Lourens
2022-06-08 09:35:00 -07:00
committed by GitHub
parent bdc8850815
commit c38afc571d
3 changed files with 62 additions and 62 deletions

View File

@@ -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 () {