Merge pull request #118471 from DonJayamanne/openNotebookBug

Repro for bug https://github.com/microsoft/vscode/issues/118470
This commit is contained in:
Johannes Rieken 2021-03-09 11:12:15 +01:00 committed by GitHub
commit 8c436826ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1240,6 +1240,12 @@ suite('Notebook API tests', function () {
assert.strictEqual(document.cells[0].metadata.executionOrder, executionOrder);
assert.strictEqual(document.cells[0].metadata.runState, vscode.NotebookCellRunState.Success);
});
test('Opening a notebook should fire activeNotebook event changed only once', async function () {
const openedEditor = asPromise(vscode.window.onDidChangeActiveNotebookEditor);
const resource = await createRandomFile('', undefined, '.vsctestnb');
await vscode.notebook.openNotebookDocument(resource);
assert.ok(await openedEditor);
});
// });