Path: blob/main/extensions/copilot/test/simulation/slash-test/testGen.cpp.stest.ts
13394 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as assert from 'assert';6import { Intent } from '../../../src/extension/common/constants';7import { ssuite, stest } from '../../base/stest';8import { forInline, simulateInlineChatWithStrategy } from '../inlineChatSimulator';9import { assertWorkspaceEdit, fromFixture } from '../stestUtil';1011forInline((strategy, nonExtensionConfigurations, suffix) => {1213ssuite({ title: `/tests${suffix}`, location: 'inline', language: 'cpp', nonExtensionConfigurations }, () => {1415stest({ description: 'can create a new test file' }, (testingServiceCollection) => {16return simulateInlineChatWithStrategy(strategy, testingServiceCollection, {17files: [18fromFixture('cpp/basic/main.cpp'),19],20queries: [{21file: 'main.cpp',22selection: [10, 16],23query: '/tests',24expectedIntent: Intent.Tests,25validate: async (outcome, workspace, accessor) => {26assertWorkspaceEdit(outcome);27assert.strictEqual(outcome.files.length, 1);28}29}]30});31});32});33});343536