Skip to content

Commit 27d3ac5

Browse files
committed
fix test
1 parent dd6e4b4 commit 27d3ac5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/copilotTools.unit.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,10 @@ suite('GetEnvironmentInfoTool Tests', () => {
314314

315315
const options = { input: testFile, toolInvocationToken: undefined };
316316
const token = new vscode.CancellationTokenSource().token;
317-
await assert.rejects(getEnvironmentInfoTool.invoke(options, token), {
318-
message: 'Unable to get environment',
319-
});
317+
const result = getEnvironmentInfoTool.invoke(options, token);
318+
const content = (await result).content as vscode.LanguageModelTextPart[];
319+
const firstPart = content[0] as vscode.MarkdownString;
320+
assert.strictEqual(firstPart.value.includes('An error occurred while fetching environment information'), true);
320321
});
321322
test('should return successful with environment info', async () => {
322323
// create mock of PythonEnvironment

0 commit comments

Comments
 (0)