mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
fix #116808.
This commit is contained in:
@@ -1403,7 +1403,7 @@ suite('Notebook API tests', function () {
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor!.selection?.document.getText(), 'var abc = 0;');
|
||||
|
||||
// no kernel -> no default language
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor!.kernel, undefined);
|
||||
// assert.strictEqual(vscode.window.activeNotebookEditor!.kernel, undefined);
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor!.selection?.language, 'typescript');
|
||||
|
||||
await vscode.commands.executeCommand('vscode.openWith', resource, 'default');
|
||||
@@ -1511,6 +1511,21 @@ suite('Notebook API tests', function () {
|
||||
await saveAllFilesAndCloseAll(resource);
|
||||
});
|
||||
|
||||
|
||||
test('#116808, active kernel should not be undefined', async function () {
|
||||
assertInitalState();
|
||||
const resource = await createRandomFile('', undefined, '.vsctestnb');
|
||||
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
|
||||
|
||||
await withEvent(vscode.notebook.onDidChangeActiveNotebookKernel, async event => {
|
||||
await event;
|
||||
assert.notStrictEqual(vscode.window.activeNotebookEditor?.kernel, undefined);
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.kernel?.id, 'mainKernel');
|
||||
});
|
||||
|
||||
await saveAllFilesAndCloseAll(resource);
|
||||
});
|
||||
|
||||
// });
|
||||
|
||||
// suite('webview', () => {
|
||||
|
||||
Reference in New Issue
Block a user