diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts index 9fccde765f9..fb6282084d8 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.editor.test.ts @@ -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()); + }); }); diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts index 01c682f5678..72e771489bc 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/notebook.test.ts @@ -1132,12 +1132,8 @@ 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); - }); + + // });