mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-30 05:21:08 +01:00
make notebook integration test more stable, fixes https://github.com/microsoft/vscode/issues/118889
This commit is contained in:
@@ -67,4 +67,12 @@ suite('Notebook Editor', function () {
|
||||
assert.strictEqual(count1 + 1, count2);
|
||||
|
||||
});
|
||||
|
||||
test('Opening a notebook should fire activeNotebook event changed only once', async function () {
|
||||
const openedEditor = utils.asPromise(vscode.window.onDidChangeActiveNotebookEditor);
|
||||
const resource = await utils.createRandomFile(undefined, undefined, '.vsctestnb');
|
||||
const editor = await vscode.window.showNotebookDocument(resource);
|
||||
assert.ok(await openedEditor);
|
||||
assert.strictEqual(editor.document.uri.toString(), resource.toString());
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user