mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
testing: fix breakage if item has same ID as test controller (#162620)
Fixes #160671
This commit is contained in:
@@ -141,6 +141,19 @@ suite('ExtHost Testing', () => {
|
||||
assert.strictEqual(ab.parent, a);
|
||||
});
|
||||
|
||||
test('can add an item with same ID as root', () => {
|
||||
single.collectDiff();
|
||||
|
||||
const child = new TestItemImpl('ctrlId', 'ctrlId', 'c', undefined);
|
||||
single.root.children.add(child);
|
||||
assert.deepStrictEqual(single.collectDiff(), [
|
||||
{
|
||||
op: TestDiffOpType.Add,
|
||||
item: { controllerId: 'ctrlId', expand: TestItemExpandState.NotExpandable, item: convert.TestItem.from(child) },
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
test('no-ops if items not changed', () => {
|
||||
single.collectDiff();
|
||||
assert.deepStrictEqual(single.collectDiff(), []);
|
||||
|
||||
Reference in New Issue
Block a user