mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
add more tab tests
This commit is contained in:
@@ -68,4 +68,24 @@ suite('ExtHostEditorTabs', function () {
|
||||
assert.strictEqual(first.tabs.indexOf(first.activeTab), 0);
|
||||
}
|
||||
});
|
||||
|
||||
test('Empty tab group', function () {
|
||||
const extHostEditorTabs = new ExtHostEditorTabs(
|
||||
SingleProxyRPCProtocol(new class extends mock<MainThreadEditorTabsShape>() {
|
||||
// override/implement $moveTab or $closeTab
|
||||
})
|
||||
);
|
||||
|
||||
extHostEditorTabs.$acceptEditorTabModel([{
|
||||
isActive: true,
|
||||
viewColumn: 0,
|
||||
groupId: 12,
|
||||
tabs: [],
|
||||
activeTab: undefined
|
||||
}]);
|
||||
assert.strictEqual(extHostEditorTabs.tabGroups.all.length, 1);
|
||||
const [first] = extHostEditorTabs.tabGroups.all;
|
||||
assert.strictEqual(first.activeTab, undefined);
|
||||
assert.strictEqual(first.tabs.length, 0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user