Skip to content

Commit a747ee6

Browse files
committed
fix tests
1 parent ab0eafa commit a747ee6

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/vs/workbench/contrib/chat/test/browser/languageModelsConfiguration.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ suite('LanguageModelsConfiguration', () => {
4949
const model = testDisposables.add(createTextModel(content));
5050
const result = parseLanguageModelsProviderGroups(model);
5151

52-
const config = result;
52+
const configurations = result[0].configurations as { configuration: Record<string, unknown> }[];
53+
const config = configurations[0].configuration;
5354
assert.deepStrictEqual(config, { foo: 'bar' });
5455
});
5556

@@ -93,7 +94,8 @@ suite('LanguageModelsConfiguration', () => {
9394
const model = testDisposables.add(createTextModel(content));
9495
const result = parseLanguageModelsProviderGroups(model);
9596

96-
const config = result[0];
97+
const configurations = result[0]?.configurations as { configuration: Record<string, unknown> }[];
98+
const config = configurations[0].configuration;
9799
assert.strictEqual(config.str, 'value');
98100
assert.strictEqual(config.num, 123);
99101
assert.strictEqual(config.bool, true);

src/vs/workbench/contrib/chat/test/common/languageModels.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ suite('LanguageModels', function () {
4545
new MockContextKeyService(),
4646
new TestConfigurationService(),
4747
new TestChatEntitlementService(),
48-
new class extends mock<ILanguageModelsConfigurationService>() { },
48+
new class extends mock<ILanguageModelsConfigurationService>() {
49+
override getLanguageModelsProviderGroups() {
50+
return [];
51+
}
52+
},
4953
new class extends mock<IQuickInputService>() { },
5054
new TestSecretStorageService(),
5155
);

0 commit comments

Comments
 (0)