agentic-qe 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +1 -1
  3. package/dist/agents/pool/AgentPool.d.ts +112 -0
  4. package/dist/agents/pool/AgentPool.d.ts.map +1 -0
  5. package/dist/agents/pool/AgentPool.js +573 -0
  6. package/dist/agents/pool/AgentPool.js.map +1 -0
  7. package/dist/agents/pool/QEAgentPoolFactory.d.ts +118 -0
  8. package/dist/agents/pool/QEAgentPoolFactory.d.ts.map +1 -0
  9. package/dist/agents/pool/QEAgentPoolFactory.js +251 -0
  10. package/dist/agents/pool/QEAgentPoolFactory.js.map +1 -0
  11. package/dist/agents/pool/index.d.ts +34 -0
  12. package/dist/agents/pool/index.d.ts.map +1 -0
  13. package/dist/agents/pool/index.js +44 -0
  14. package/dist/agents/pool/index.js.map +1 -0
  15. package/dist/agents/pool/types.d.ts +227 -0
  16. package/dist/agents/pool/types.d.ts.map +1 -0
  17. package/dist/agents/pool/types.js +28 -0
  18. package/dist/agents/pool/types.js.map +1 -0
  19. package/dist/mcp/handlers/agent-spawn.d.ts +71 -5
  20. package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
  21. package/dist/mcp/handlers/agent-spawn.js +336 -110
  22. package/dist/mcp/handlers/agent-spawn.js.map +1 -1
  23. package/dist/mcp/handlers/fleet-init.d.ts +24 -0
  24. package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
  25. package/dist/mcp/handlers/fleet-init.js +56 -4
  26. package/dist/mcp/handlers/fleet-init.js.map +1 -1
  27. package/dist/mcp/server-instructions.d.ts +1 -1
  28. package/dist/mcp/server-instructions.js +1 -1
  29. package/dist/memory/HNSWPatternStore.d.ts.map +1 -1
  30. package/dist/memory/HNSWPatternStore.js.map +1 -1
  31. package/dist/plugins/BasePlugin.d.ts +111 -0
  32. package/dist/plugins/BasePlugin.d.ts.map +1 -0
  33. package/dist/plugins/BasePlugin.js +154 -0
  34. package/dist/plugins/BasePlugin.js.map +1 -0
  35. package/dist/plugins/PluginManager.d.ts +145 -0
  36. package/dist/plugins/PluginManager.d.ts.map +1 -0
  37. package/dist/plugins/PluginManager.js +862 -0
  38. package/dist/plugins/PluginManager.js.map +1 -0
  39. package/dist/plugins/adapters/McpToolsPlugin.d.ts +98 -0
  40. package/dist/plugins/adapters/McpToolsPlugin.d.ts.map +1 -0
  41. package/dist/plugins/adapters/McpToolsPlugin.js +518 -0
  42. package/dist/plugins/adapters/McpToolsPlugin.js.map +1 -0
  43. package/dist/plugins/adapters/PlaywrightPlugin.d.ts +63 -0
  44. package/dist/plugins/adapters/PlaywrightPlugin.d.ts.map +1 -0
  45. package/dist/plugins/adapters/PlaywrightPlugin.js +451 -0
  46. package/dist/plugins/adapters/PlaywrightPlugin.js.map +1 -0
  47. package/dist/plugins/adapters/VitestPlugin.d.ts +74 -0
  48. package/dist/plugins/adapters/VitestPlugin.d.ts.map +1 -0
  49. package/dist/plugins/adapters/VitestPlugin.js +589 -0
  50. package/dist/plugins/adapters/VitestPlugin.js.map +1 -0
  51. package/dist/plugins/adapters/index.d.ts +8 -0
  52. package/dist/plugins/adapters/index.d.ts.map +1 -0
  53. package/dist/plugins/adapters/index.js +17 -0
  54. package/dist/plugins/adapters/index.js.map +1 -0
  55. package/dist/plugins/index.d.ts +32 -0
  56. package/dist/plugins/index.d.ts.map +1 -0
  57. package/dist/plugins/index.js +48 -0
  58. package/dist/plugins/index.js.map +1 -0
  59. package/dist/plugins/types.d.ts +528 -0
  60. package/dist/plugins/types.d.ts.map +1 -0
  61. package/dist/plugins/types.js +61 -0
  62. package/dist/plugins/types.js.map +1 -0
  63. package/package.json +4 -1
@@ -0,0 +1,451 @@
1
+ "use strict";
2
+ /**
3
+ * Playwright Test Framework Plugin
4
+ * Phase 3 B2: Reference Plugin Implementation
5
+ *
6
+ * Provides Playwright test generation, parsing, and execution capabilities.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.PlaywrightPlugin = void 0;
10
+ exports.createPlaywrightPlugin = createPlaywrightPlugin;
11
+ const child_process_1 = require("child_process");
12
+ const types_1 = require("../types");
13
+ const BasePlugin_1 = require("../BasePlugin");
14
+ /**
15
+ * Playwright Plugin - Test framework adapter for Playwright
16
+ */
17
+ class PlaywrightPlugin extends BasePlugin_1.BasePlugin {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.metadata = (0, BasePlugin_1.createPluginMetadata)({
21
+ id: '@agentic-qe/playwright-adapter',
22
+ name: 'Playwright Test Adapter',
23
+ version: '1.0.0',
24
+ description: 'Generate, parse, and execute Playwright tests',
25
+ author: 'Agentic QE Team',
26
+ category: types_1.PluginCategory.TEST_FRAMEWORK,
27
+ minAgenticQEVersion: '2.6.0',
28
+ });
29
+ this.filePatterns = [
30
+ '**/*.spec.ts',
31
+ '**/*.spec.js',
32
+ '**/*.test.ts',
33
+ '**/*.test.js',
34
+ '**/e2e/**/*.ts',
35
+ ];
36
+ this.frameworkId = 'playwright';
37
+ this.initialized = false;
38
+ }
39
+ async onActivate(context) {
40
+ await super.onActivate(context);
41
+ // Register as test framework service
42
+ this.registerService('testFramework:playwright', this);
43
+ this.initialized = true;
44
+ this.log('info', 'Playwright adapter ready');
45
+ }
46
+ async onDeactivate(context) {
47
+ this.initialized = false;
48
+ await super.onDeactivate(context);
49
+ }
50
+ /**
51
+ * Generate Playwright test from specification
52
+ */
53
+ async generateTest(spec) {
54
+ this.log('debug', 'Generating Playwright test', { sourceFile: spec.sourceFilePath });
55
+ const imports = this.generateImports(spec);
56
+ const testCode = this.generateTestCode(spec);
57
+ const filePath = spec.targetFilePath || this.inferTestFilePath(spec.sourceFilePath);
58
+ return {
59
+ code: `${imports}\n\n${testCode}`,
60
+ filePath,
61
+ imports: ['@playwright/test'],
62
+ dependencies: [
63
+ { name: '@playwright/test', version: '^1.40.0', dev: true },
64
+ ],
65
+ metadata: {
66
+ testCount: this.countTests(testCode),
67
+ coveredFunctions: this.extractCoveredFunctions(spec.sourceCode),
68
+ coverageEstimate: 0.7, // Estimate
69
+ },
70
+ };
71
+ }
72
+ /**
73
+ * Parse existing Playwright test file
74
+ */
75
+ async parseTestFile(filePath, content) {
76
+ this.log('debug', 'Parsing Playwright test file', { filePath });
77
+ const suites = [];
78
+ const imports = [];
79
+ const hooks = [];
80
+ const lines = content.split('\n');
81
+ // Extract imports
82
+ for (let i = 0; i < lines.length; i++) {
83
+ const line = lines[i];
84
+ if (line.match(/^import\s/)) {
85
+ imports.push(line);
86
+ }
87
+ }
88
+ // Parse test structure using regex (simplified)
89
+ const describeRegex = /test\.describe\s*\(\s*['"`](.+?)['"`]/g;
90
+ const testRegex = /test\s*\(\s*['"`](.+?)['"`]/g;
91
+ const beforeAllRegex = /test\.beforeAll/g;
92
+ const afterAllRegex = /test\.afterAll/g;
93
+ const beforeEachRegex = /test\.beforeEach/g;
94
+ const afterEachRegex = /test\.afterEach/g;
95
+ // Find describes (suites)
96
+ let match;
97
+ while ((match = describeRegex.exec(content)) !== null) {
98
+ const line = content.substring(0, match.index).split('\n').length;
99
+ suites.push({
100
+ name: match[1],
101
+ tests: [],
102
+ nestedSuites: [],
103
+ hooks: [],
104
+ line,
105
+ });
106
+ }
107
+ // Find standalone tests
108
+ const standaloneTests = [];
109
+ while ((match = testRegex.exec(content)) !== null) {
110
+ const line = content.substring(0, match.index).split('\n').length;
111
+ const isSkipped = content.substring(match.index - 10, match.index).includes('.skip');
112
+ const isOnly = content.substring(match.index - 10, match.index).includes('.only');
113
+ standaloneTests.push({
114
+ name: match[1],
115
+ line,
116
+ isSkipped,
117
+ isOnly,
118
+ });
119
+ }
120
+ // Find hooks
121
+ const hookPatterns = [
122
+ [beforeAllRegex, 'beforeAll'],
123
+ [afterAllRegex, 'afterAll'],
124
+ [beforeEachRegex, 'beforeEach'],
125
+ [afterEachRegex, 'afterEach'],
126
+ ];
127
+ for (const [regex, type] of hookPatterns) {
128
+ while ((match = regex.exec(content)) !== null) {
129
+ const line = content.substring(0, match.index).split('\n').length;
130
+ hooks.push({ type, line });
131
+ }
132
+ }
133
+ // If no suites found, create a default one with standalone tests
134
+ if (suites.length === 0 && standaloneTests.length > 0) {
135
+ suites.push({
136
+ name: 'Default Suite',
137
+ tests: standaloneTests,
138
+ nestedSuites: [],
139
+ hooks: [],
140
+ line: 1,
141
+ });
142
+ }
143
+ return { suites, imports, hooks };
144
+ }
145
+ /**
146
+ * Execute Playwright tests - REAL IMPLEMENTATION
147
+ */
148
+ async executeTests(options) {
149
+ this.log('info', 'Executing Playwright tests', {
150
+ files: options.testFiles.length,
151
+ parallel: options.parallel,
152
+ });
153
+ const startTime = Date.now();
154
+ try {
155
+ // Build command arguments
156
+ const args = ['playwright', 'test', '--reporter=json'];
157
+ if (options.testFiles.length > 0) {
158
+ args.push(...options.testFiles);
159
+ }
160
+ if (options.testNamePattern) {
161
+ args.push('--grep', options.testNamePattern);
162
+ }
163
+ if (options.parallel === false) {
164
+ args.push('--workers=1');
165
+ }
166
+ else if (options.maxWorkers) {
167
+ args.push(`--workers=${options.maxWorkers}`);
168
+ }
169
+ if (options.timeout) {
170
+ args.push(`--timeout=${options.timeout}`);
171
+ }
172
+ // Actually execute via child process
173
+ const result = await this.spawnProcess('npx', args, options.env);
174
+ const duration = Date.now() - startTime;
175
+ // Parse JSON output from Playwright
176
+ const testResults = this.parsePlaywrightOutput(result.stdout, result.stderr);
177
+ return {
178
+ success: result.exitCode === 0,
179
+ tests: testResults,
180
+ duration,
181
+ output: result.stdout || result.stderr,
182
+ };
183
+ }
184
+ catch (error) {
185
+ return {
186
+ success: false,
187
+ tests: [],
188
+ duration: Date.now() - startTime,
189
+ output: `Error: ${error instanceof Error ? error.message : String(error)}`,
190
+ };
191
+ }
192
+ }
193
+ /**
194
+ * Spawn a child process and capture output
195
+ */
196
+ spawnProcess(command, args, env) {
197
+ return new Promise((resolve, reject) => {
198
+ const child = (0, child_process_1.spawn)(command, args, {
199
+ env: { ...process.env, ...env },
200
+ shell: true,
201
+ cwd: process.cwd(),
202
+ });
203
+ let stdout = '';
204
+ let stderr = '';
205
+ child.stdout?.on('data', (data) => {
206
+ stdout += data.toString();
207
+ });
208
+ child.stderr?.on('data', (data) => {
209
+ stderr += data.toString();
210
+ });
211
+ child.on('close', (code) => {
212
+ resolve({
213
+ stdout,
214
+ stderr,
215
+ exitCode: code ?? 1,
216
+ });
217
+ });
218
+ child.on('error', (error) => {
219
+ reject(error);
220
+ });
221
+ });
222
+ }
223
+ /**
224
+ * Parse Playwright JSON output into TestResult array
225
+ */
226
+ parsePlaywrightOutput(stdout, stderr) {
227
+ const results = [];
228
+ try {
229
+ // Try to parse JSON output
230
+ const jsonMatch = stdout.match(/\{[\s\S]*"suites"[\s\S]*\}/);
231
+ if (jsonMatch) {
232
+ const report = JSON.parse(jsonMatch[0]);
233
+ // Extract test results from Playwright JSON format
234
+ const extractTests = (suites) => {
235
+ for (const suite of suites || []) {
236
+ for (const spec of suite.specs || []) {
237
+ for (const test of spec.tests || []) {
238
+ const result = test.results?.[0];
239
+ results.push({
240
+ name: spec.title,
241
+ suite: suite.title,
242
+ status: this.mapPlaywrightStatus(result?.status || 'skipped'),
243
+ duration: result?.duration || 0,
244
+ error: result?.error ? {
245
+ message: result.error.message || 'Unknown error',
246
+ stack: result.error.stack,
247
+ } : undefined,
248
+ });
249
+ }
250
+ }
251
+ // Recurse into nested suites
252
+ if (suite.suites) {
253
+ extractTests(suite.suites);
254
+ }
255
+ }
256
+ };
257
+ extractTests(report.suites || []);
258
+ }
259
+ }
260
+ catch {
261
+ // If JSON parsing fails, try to parse text output
262
+ this.log('debug', 'Failed to parse JSON, falling back to text parsing');
263
+ const passedMatch = stdout.match(/(\d+) passed/);
264
+ const failedMatch = stdout.match(/(\d+) failed/);
265
+ const skippedMatch = stdout.match(/(\d+) skipped/);
266
+ if (passedMatch || failedMatch || skippedMatch) {
267
+ const passed = parseInt(passedMatch?.[1] || '0', 10);
268
+ const failed = parseInt(failedMatch?.[1] || '0', 10);
269
+ const skipped = parseInt(skippedMatch?.[1] || '0', 10);
270
+ for (let i = 0; i < passed; i++) {
271
+ results.push({ name: `Test ${i + 1}`, suite: 'Suite', status: 'passed', duration: 0 });
272
+ }
273
+ for (let i = 0; i < failed; i++) {
274
+ results.push({ name: `Failed Test ${i + 1}`, suite: 'Suite', status: 'failed', duration: 0 });
275
+ }
276
+ for (let i = 0; i < skipped; i++) {
277
+ results.push({ name: `Skipped Test ${i + 1}`, suite: 'Suite', status: 'skipped', duration: 0 });
278
+ }
279
+ }
280
+ }
281
+ return results;
282
+ }
283
+ /**
284
+ * Map Playwright status to our status type
285
+ */
286
+ mapPlaywrightStatus(status) {
287
+ switch (status) {
288
+ case 'passed':
289
+ case 'expected':
290
+ return 'passed';
291
+ case 'failed':
292
+ case 'unexpected':
293
+ case 'timedOut':
294
+ return 'failed';
295
+ case 'skipped':
296
+ return 'skipped';
297
+ default:
298
+ return 'pending';
299
+ }
300
+ }
301
+ /**
302
+ * Get Playwright framework configuration
303
+ */
304
+ getFrameworkConfig() {
305
+ return {
306
+ configFileName: 'playwright.config.ts',
307
+ defaultTestDir: 'tests',
308
+ configTemplate: this.getConfigTemplate(),
309
+ dependencies: [
310
+ { name: '@playwright/test', version: '^1.40.0', dev: true },
311
+ ],
312
+ };
313
+ }
314
+ // === Private Methods ===
315
+ generateImports(spec) {
316
+ const imports = ["import { test, expect } from '@playwright/test';"];
317
+ if (spec.testType === 'e2e') {
318
+ imports.push("import { Page } from '@playwright/test';");
319
+ }
320
+ return imports.join('\n');
321
+ }
322
+ generateTestCode(spec) {
323
+ const functionNames = this.extractFunctionNames(spec.sourceCode);
324
+ const className = this.extractClassName(spec.sourceCode);
325
+ const tests = [];
326
+ if (spec.testType === 'e2e') {
327
+ tests.push(this.generateE2ETests(spec));
328
+ }
329
+ else if (spec.testType === 'component') {
330
+ tests.push(this.generateComponentTests(spec, className, functionNames));
331
+ }
332
+ else {
333
+ tests.push(this.generateUnitTests(spec, className, functionNames));
334
+ }
335
+ const suiteName = className || 'Module';
336
+ return `test.describe('${suiteName}', () => {\n${tests.join('\n\n')}\n});`;
337
+ }
338
+ generateE2ETests(spec) {
339
+ return ` test('should load the page successfully', async ({ page }) => {
340
+ await page.goto('/');
341
+ await expect(page).toHaveTitle(/./);
342
+ });
343
+
344
+ test('should navigate correctly', async ({ page }) => {
345
+ await page.goto('/');
346
+ // Add navigation tests based on the source
347
+ await expect(page.locator('body')).toBeVisible();
348
+ });`;
349
+ }
350
+ generateComponentTests(spec, className, functionNames) {
351
+ const tests = [];
352
+ tests.push(` test('should render ${className || 'component'} correctly', async ({ page }) => {
353
+ // Component render test
354
+ await expect(page.locator('[data-testid="${(className || 'component').toLowerCase()}"]')).toBeVisible();
355
+ });`);
356
+ for (const fn of functionNames.slice(0, 3)) {
357
+ tests.push(` test('should handle ${fn} interaction', async ({ page }) => {
358
+ // Interaction test for ${fn}
359
+ await expect(page.locator('body')).toBeVisible();
360
+ });`);
361
+ }
362
+ return tests.join('\n\n');
363
+ }
364
+ generateUnitTests(spec, className, functionNames) {
365
+ const tests = [];
366
+ for (const fn of functionNames) {
367
+ tests.push(` test('${fn} should work correctly', async ({ page }) => {
368
+ // Unit test for ${fn}
369
+ // Note: Playwright is typically for E2E, consider using Vitest for unit tests
370
+ await expect(true).toBe(true);
371
+ });`);
372
+ }
373
+ if (tests.length === 0) {
374
+ tests.push(` test('should pass basic validation', async ({ page }) => {
375
+ await expect(true).toBe(true);
376
+ });`);
377
+ }
378
+ return tests.join('\n\n');
379
+ }
380
+ extractFunctionNames(sourceCode) {
381
+ const patterns = [
382
+ /function\s+(\w+)/g,
383
+ /(\w+)\s*=\s*(?:async\s*)?\(/g,
384
+ /(\w+)\s*\([^)]*\)\s*{/g,
385
+ /async\s+(\w+)\s*\(/g,
386
+ ];
387
+ const names = new Set();
388
+ for (const pattern of patterns) {
389
+ let match;
390
+ while ((match = pattern.exec(sourceCode)) !== null) {
391
+ if (match[1] && !['if', 'for', 'while', 'switch', 'catch'].includes(match[1])) {
392
+ names.add(match[1]);
393
+ }
394
+ }
395
+ }
396
+ return Array.from(names);
397
+ }
398
+ extractClassName(sourceCode) {
399
+ const match = sourceCode.match(/class\s+(\w+)/);
400
+ return match ? match[1] : null;
401
+ }
402
+ extractCoveredFunctions(sourceCode) {
403
+ return this.extractFunctionNames(sourceCode);
404
+ }
405
+ countTests(testCode) {
406
+ const matches = testCode.match(/test\s*\(/g);
407
+ return matches ? matches.length : 0;
408
+ }
409
+ inferTestFilePath(sourceFilePath) {
410
+ const dir = sourceFilePath.replace(/\/[^/]+$/, '');
411
+ const fileName = sourceFilePath.replace(/^.*\//, '').replace(/\.(ts|js|tsx|jsx)$/, '');
412
+ return `${dir}/__tests__/${fileName}.spec.ts`;
413
+ }
414
+ getConfigTemplate() {
415
+ return `import { defineConfig, devices } from '@playwright/test';
416
+
417
+ export default defineConfig({
418
+ testDir: './tests',
419
+ fullyParallel: true,
420
+ forbidOnly: !!process.env.CI,
421
+ retries: process.env.CI ? 2 : 0,
422
+ workers: process.env.CI ? 1 : undefined,
423
+ reporter: 'html',
424
+ use: {
425
+ trace: 'on-first-retry',
426
+ },
427
+ projects: [
428
+ {
429
+ name: 'chromium',
430
+ use: { ...devices['Desktop Chrome'] },
431
+ },
432
+ {
433
+ name: 'firefox',
434
+ use: { ...devices['Desktop Firefox'] },
435
+ },
436
+ {
437
+ name: 'webkit',
438
+ use: { ...devices['Desktop Safari'] },
439
+ },
440
+ ],
441
+ });`;
442
+ }
443
+ }
444
+ exports.PlaywrightPlugin = PlaywrightPlugin;
445
+ /**
446
+ * Factory function for plugin registration
447
+ */
448
+ function createPlaywrightPlugin() {
449
+ return new PlaywrightPlugin();
450
+ }
451
+ //# sourceMappingURL=PlaywrightPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaywrightPlugin.js","sourceRoot":"","sources":["../../../src/plugins/adapters/PlaywrightPlugin.ts"],"names":[],"mappings":";AA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AEO,iBAAiB;QACvB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BP,CAAC;IACH,CAAC;CACF;AAtfD,4CAsfC;AAED;;GAEG;AACH,SAAgB,sBAAsB;IACpC,OAAO,IAAI,gBAAgB,EAAE,CAAC;AAChC,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Vitest Test Framework Plugin
3
+ * Phase 3 B2: Reference Plugin Implementation
4
+ *
5
+ * Provides Vitest test generation, parsing, and execution capabilities.
6
+ * Designed as a Jest alternative with modern ESM support.
7
+ */
8
+ import { TestFrameworkPlugin, PluginMetadata, PluginContext, TestGenerationSpec, GeneratedTest, ParsedTestFile, TestExecutionOptions, TestExecutionResult, FrameworkConfig } from '../types';
9
+ import { BasePlugin } from '../BasePlugin';
10
+ /**
11
+ * Vitest Plugin - Test framework adapter for Vitest
12
+ */
13
+ export declare class VitestPlugin extends BasePlugin implements TestFrameworkPlugin {
14
+ readonly metadata: PluginMetadata;
15
+ readonly filePatterns: string[];
16
+ readonly frameworkId = "vitest";
17
+ private initialized;
18
+ onActivate(context: PluginContext): Promise<void>;
19
+ onDeactivate(context: PluginContext): Promise<void>;
20
+ /**
21
+ * Generate Vitest test from specification
22
+ */
23
+ generateTest(spec: TestGenerationSpec): Promise<GeneratedTest>;
24
+ /**
25
+ * Parse existing Vitest test file
26
+ */
27
+ parseTestFile(filePath: string, content: string): Promise<ParsedTestFile>;
28
+ /**
29
+ * Execute Vitest tests - REAL IMPLEMENTATION
30
+ */
31
+ executeTests(options: TestExecutionOptions): Promise<TestExecutionResult>;
32
+ /**
33
+ * Spawn a child process and capture output
34
+ */
35
+ private spawnProcess;
36
+ /**
37
+ * Parse Vitest JSON output into TestResult array and CoverageData
38
+ */
39
+ private parseVitestOutput;
40
+ /**
41
+ * Parse coverage map from Vitest JSON output
42
+ */
43
+ private parseCoverageMap;
44
+ /**
45
+ * Parse coverage from text output (fallback)
46
+ */
47
+ private parseCoverageFromText;
48
+ /**
49
+ * Map Vitest status to our status type
50
+ */
51
+ private mapVitestStatus;
52
+ /**
53
+ * Get Vitest framework configuration
54
+ */
55
+ getFrameworkConfig(): FrameworkConfig;
56
+ private generateImports;
57
+ private generateTestCode;
58
+ private generateUnitTests;
59
+ private generateIntegrationTests;
60
+ private generateGenericTests;
61
+ private extractFunctionNames;
62
+ private extractClassName;
63
+ private extractModuleName;
64
+ private extractCoveredFunctions;
65
+ private countTests;
66
+ private inferTestFilePath;
67
+ private getRelativeImportPath;
68
+ private getConfigTemplate;
69
+ }
70
+ /**
71
+ * Factory function for plugin registration
72
+ */
73
+ export declare function createVitestPlugin(): VitestPlugin;
74
+ //# sourceMappingURL=VitestPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitestPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/adapters/VitestPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EAEb,kBAAkB,EAClB,aAAa,EACb,cAAc,EAId,oBAAoB,EACpB,mBAAmB,EAGnB,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAwB,MAAM,eAAe,CAAC;AAEjE;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAW,YAAW,mBAAmB;IACzE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAQ9B;IAEH,QAAQ,CAAC,YAAY,WAOnB;IAEF,QAAQ,CAAC,WAAW,YAAY;IAEhC,OAAO,CAAC,WAAW,CAAS;IAEtB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAUjD,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzD;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAsBpE;;OAEG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,EAA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