assert unsetting of active notebook needs null, https://github.com/microsoft/vscode/issues/118470

This commit is contained in:
Johannes Rieken 2021-03-09 11:31:12 +01:00
parent bcfcb539ab
commit 0e04c15de4
No known key found for this signature in database
GPG key ID: 96634B5AF12F8798

View file

@ -374,4 +374,19 @@ suite('NotebookCell#Document', function () {
assert.strictEqual(count, 1);
});
test('unset active notebook editor', function () {
const editor = extHostNotebooks.activeNotebookEditor;
assert.ok(editor !== undefined);
extHostNotebooks.$acceptDocumentAndEditorsDelta({ newActiveEditor: undefined });
assert.ok(extHostNotebooks.activeNotebookEditor === editor);
extHostNotebooks.$acceptDocumentAndEditorsDelta({});
assert.ok(extHostNotebooks.activeNotebookEditor === editor);
extHostNotebooks.$acceptDocumentAndEditorsDelta({ newActiveEditor: null });
assert.ok(extHostNotebooks.activeNotebookEditor === undefined);
});
});