Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/test/e2e/tools.stest.ts
13388 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
7
import path from 'path';
8
import { ssuite, stest } from '../base/stest';
9
import { fetchToolScenarios, generateToolTestRunner } from './toolSimTest';
10
11
export function shouldSkipAgentTests(): boolean {
12
return process.env.AGENT_TESTS !== '1';
13
}
14
15
ssuite.optional(shouldSkipAgentTests, { title: 'toolCalling', location: 'panel' }, (inputPath) => {
16
const scenarioFolder = inputPath ?? path.join(__dirname, '..', 'test/scenarios/test-tools');
17
const scenarios = fetchToolScenarios(scenarioFolder);
18
19
for (const scenario of scenarios) {
20
stest(scenario[0].question,
21
generateToolTestRunner(scenario));
22
}
23
});
24
25