Files
vscode/extensions/copilot/test/inline/inlineExplain.stest.ts
Matt Bierner 3c8134184b Enable no-unexternalized-strings in repo (#2448)
Enables the same `no-unexternalized-strings` with have in `vscode` in this repo. This make sure we have a more consistent style across repos and when generating edits
2025-12-05 18:45:12 +00:00

35 lines
1.4 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import assert from 'assert';
import { Intent } from '../../src/extension/common/constants';
import { ssuite, stest } from '../base/stest';
import { simulateInlineChat } from '../simulation/inlineChatSimulator';
import { assertConversationalOutcome, fromFixture } from '../simulation/stestUtil';
ssuite({ title: 'explain', location: 'inline' }, () => {
stest({ description: 'is not distracted by project context', language: 'css' }, (testingServiceCollection) => {
return simulateInlineChat(testingServiceCollection, {
files: [
fromFixture('explain-project-context/inlineChat.css'),
fromFixture('explain-project-context/package.json'),
fromFixture('explain-project-context/tsconfig.json'),
],
queries: [
{
file: 'inlineChat.css',
selection: [152, 0, 158, 1],
query: 'explain',
expectedIntent: Intent.Explain,
validate: async (outcome, workspace, accessor) => {
assertConversationalOutcome(outcome);
const css = outcome.chatResponseMarkdown.indexOf('CSS');
assert.ok(css >= 0, 'Explanation did not mention CSS');
}
}
],
});
});
});