@vibe-validate/extractors 0.16.1 → 0.17.0-rc.10
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.
- package/dist/extractor-registry.d.ts +103 -0
- package/dist/extractor-registry.d.ts.map +1 -0
- package/dist/extractor-registry.js +278 -0
- package/dist/extractor-registry.js.map +1 -0
- package/dist/extractors/ava/index.d.ts +23 -0
- package/dist/extractors/ava/index.d.ts.map +1 -0
- package/dist/extractors/ava/index.js +507 -0
- package/dist/extractors/ava/index.js.map +1 -0
- package/dist/extractors/ava/index.test.d.ts +7 -0
- package/dist/extractors/ava/index.test.d.ts.map +1 -0
- package/dist/extractors/ava/index.test.js +408 -0
- package/dist/extractors/ava/index.test.js.map +1 -0
- package/dist/extractors/eslint/index.d.ts +18 -0
- package/dist/extractors/eslint/index.d.ts.map +1 -0
- package/dist/extractors/eslint/index.js +206 -0
- package/dist/extractors/eslint/index.js.map +1 -0
- package/dist/extractors/eslint/index.test.d.ts +9 -0
- package/dist/extractors/eslint/index.test.d.ts.map +1 -0
- package/dist/extractors/eslint/index.test.js +191 -0
- package/dist/extractors/eslint/index.test.js.map +1 -0
- package/dist/extractors/generic/index.d.ts +30 -0
- package/dist/extractors/generic/index.d.ts.map +1 -0
- package/dist/extractors/generic/index.js +140 -0
- package/dist/extractors/generic/index.js.map +1 -0
- package/dist/extractors/generic/index.test.d.ts +7 -0
- package/dist/extractors/generic/index.test.d.ts.map +1 -0
- package/dist/extractors/generic/index.test.js +61 -0
- package/dist/extractors/generic/index.test.js.map +1 -0
- package/dist/extractors/jasmine/index.d.ts +17 -0
- package/dist/extractors/jasmine/index.d.ts.map +1 -0
- package/dist/extractors/jasmine/index.js +254 -0
- package/dist/extractors/jasmine/index.js.map +1 -0
- package/dist/extractors/jasmine/index.test.d.ts +7 -0
- package/dist/extractors/jasmine/index.test.d.ts.map +1 -0
- package/dist/extractors/jasmine/index.test.js +345 -0
- package/dist/extractors/jasmine/index.test.js.map +1 -0
- package/dist/extractors/jest/index.d.ts +17 -0
- package/dist/extractors/jest/index.d.ts.map +1 -0
- package/dist/extractors/jest/index.js +278 -0
- package/dist/extractors/jest/index.js.map +1 -0
- package/dist/extractors/jest/index.test.d.ts +9 -0
- package/dist/extractors/jest/index.test.d.ts.map +1 -0
- package/dist/extractors/jest/index.test.js +353 -0
- package/dist/extractors/jest/index.test.js.map +1 -0
- package/dist/extractors/junit/index.d.ts +18 -0
- package/dist/extractors/junit/index.d.ts.map +1 -0
- package/dist/extractors/junit/index.js +259 -0
- package/dist/extractors/junit/index.js.map +1 -0
- package/dist/extractors/junit/index.test.d.ts +7 -0
- package/dist/extractors/junit/index.test.d.ts.map +1 -0
- package/dist/extractors/junit/index.test.js +341 -0
- package/dist/extractors/junit/index.test.js.map +1 -0
- package/dist/extractors/maven-checkstyle/index.d.ts +23 -0
- package/dist/extractors/maven-checkstyle/index.d.ts.map +1 -0
- package/dist/extractors/maven-checkstyle/index.js +263 -0
- package/dist/extractors/maven-checkstyle/index.js.map +1 -0
- package/dist/extractors/maven-checkstyle/index.test.d.ts +2 -0
- package/dist/extractors/maven-checkstyle/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-checkstyle/index.test.js +197 -0
- package/dist/extractors/maven-checkstyle/index.test.js.map +1 -0
- package/dist/extractors/maven-compiler/index.d.ts +23 -0
- package/dist/extractors/maven-compiler/index.d.ts.map +1 -0
- package/dist/extractors/maven-compiler/index.js +271 -0
- package/dist/extractors/maven-compiler/index.js.map +1 -0
- package/dist/extractors/maven-compiler/index.test.d.ts +2 -0
- package/dist/extractors/maven-compiler/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-compiler/index.test.js +189 -0
- package/dist/extractors/maven-compiler/index.test.js.map +1 -0
- package/dist/extractors/maven-surefire/index.d.ts +23 -0
- package/dist/extractors/maven-surefire/index.d.ts.map +1 -0
- package/dist/extractors/maven-surefire/index.js +292 -0
- package/dist/extractors/maven-surefire/index.js.map +1 -0
- package/dist/extractors/maven-surefire/index.test.d.ts +2 -0
- package/dist/extractors/maven-surefire/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-surefire/index.test.js +169 -0
- package/dist/extractors/maven-surefire/index.test.js.map +1 -0
- package/dist/extractors/mocha/index.d.ts +17 -0
- package/dist/extractors/mocha/index.d.ts.map +1 -0
- package/dist/extractors/mocha/index.js +241 -0
- package/dist/extractors/mocha/index.js.map +1 -0
- package/dist/extractors/mocha/index.test.d.ts +7 -0
- package/dist/extractors/mocha/index.test.d.ts.map +1 -0
- package/dist/extractors/mocha/index.test.js +300 -0
- package/dist/extractors/mocha/index.test.js.map +1 -0
- package/dist/extractors/playwright/index.d.ts +17 -0
- package/dist/extractors/playwright/index.d.ts.map +1 -0
- package/dist/extractors/playwright/index.js +320 -0
- package/dist/extractors/playwright/index.js.map +1 -0
- package/dist/extractors/playwright/index.test.d.ts +7 -0
- package/dist/extractors/playwright/index.test.d.ts.map +1 -0
- package/dist/extractors/playwright/index.test.js +274 -0
- package/dist/extractors/playwright/index.test.js.map +1 -0
- package/dist/extractors/tap/index.d.ts +23 -0
- package/dist/extractors/tap/index.d.ts.map +1 -0
- package/dist/extractors/tap/index.js +352 -0
- package/dist/extractors/tap/index.js.map +1 -0
- package/dist/extractors/tap/index.test.d.ts +7 -0
- package/dist/extractors/tap/index.test.d.ts.map +1 -0
- package/dist/extractors/tap/index.test.js +100 -0
- package/dist/extractors/tap/index.test.js.map +1 -0
- package/dist/extractors/typescript/index.d.ts +17 -0
- package/dist/extractors/typescript/index.d.ts.map +1 -0
- package/dist/extractors/typescript/index.js +150 -0
- package/dist/extractors/typescript/index.js.map +1 -0
- package/dist/extractors/typescript/index.test.d.ts +9 -0
- package/dist/extractors/typescript/index.test.d.ts.map +1 -0
- package/dist/extractors/typescript/index.test.js +177 -0
- package/dist/extractors/typescript/index.test.js.map +1 -0
- package/dist/extractors/vitest/index.d.ts +17 -0
- package/dist/extractors/vitest/index.d.ts.map +1 -0
- package/dist/extractors/vitest/index.js +564 -0
- package/dist/extractors/vitest/index.js.map +1 -0
- package/dist/extractors/vitest/index.test.d.ts +9 -0
- package/dist/extractors/vitest/index.test.d.ts.map +1 -0
- package/dist/extractors/vitest/index.test.js +373 -0
- package/dist/extractors/vitest/index.test.js.map +1 -0
- package/dist/index.d.ts +27 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -11
- package/dist/index.js.map +1 -1
- package/dist/maven-checkstyle-extractor.d.ts +20 -0
- package/dist/maven-checkstyle-extractor.d.ts.map +1 -0
- package/dist/maven-checkstyle-extractor.js +208 -0
- package/dist/maven-checkstyle-extractor.js.map +1 -0
- package/dist/maven-compiler-extractor.d.ts +20 -0
- package/dist/maven-compiler-extractor.d.ts.map +1 -0
- package/dist/maven-compiler-extractor.js +218 -0
- package/dist/maven-compiler-extractor.js.map +1 -0
- package/dist/maven-surefire-extractor.d.ts +20 -0
- package/dist/maven-surefire-extractor.d.ts.map +1 -0
- package/dist/maven-surefire-extractor.js +228 -0
- package/dist/maven-surefire-extractor.js.map +1 -0
- package/dist/maven-utils.d.ts +24 -0
- package/dist/maven-utils.d.ts.map +1 -0
- package/dist/maven-utils.js +36 -0
- package/dist/maven-utils.js.map +1 -0
- package/dist/plugin-loader.d.ts +82 -0
- package/dist/plugin-loader.d.ts.map +1 -0
- package/dist/plugin-loader.js +201 -0
- package/dist/plugin-loader.js.map +1 -0
- package/dist/result-schema.d.ts +59 -9
- package/dist/result-schema.d.ts.map +1 -1
- package/dist/result-schema.js +3 -19
- package/dist/result-schema.js.map +1 -1
- package/dist/sandbox.d.ts +161 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +254 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/sandbox.test.d.ts +8 -0
- package/dist/sandbox.test.d.ts.map +1 -0
- package/dist/sandbox.test.js +395 -0
- package/dist/sandbox.test.js.map +1 -0
- package/dist/sandboxed-extractor.d.ts +46 -0
- package/dist/sandboxed-extractor.d.ts.map +1 -0
- package/dist/sandboxed-extractor.js +172 -0
- package/dist/sandboxed-extractor.js.map +1 -0
- package/dist/sandboxed-extractor.test.d.ts +5 -0
- package/dist/sandboxed-extractor.test.d.ts.map +1 -0
- package/dist/sandboxed-extractor.test.js +346 -0
- package/dist/sandboxed-extractor.test.js.map +1 -0
- package/dist/smart-extractor.d.ts +22 -10
- package/dist/smart-extractor.d.ts.map +1 -1
- package/dist/smart-extractor.js +116 -163
- package/dist/smart-extractor.js.map +1 -1
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jasmine Error Extractor Plugin
|
|
3
|
+
*
|
|
4
|
+
* Parses and formats Jasmine test output for LLM consumption.
|
|
5
|
+
*
|
|
6
|
+
* @package @vibe-validate/extractors
|
|
7
|
+
*/
|
|
8
|
+
import { processTestFailures } from '../../utils/test-framework-utils.js';
|
|
9
|
+
/**
|
|
10
|
+
* Extract failure information from Jasmine output
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 28 acceptable for Jasmine output parsing (handles numbered failures, message extraction, and stack trace parsing)
|
|
13
|
+
function extractFailures(output) {
|
|
14
|
+
const failures = [];
|
|
15
|
+
const lines = output.split('\n');
|
|
16
|
+
let i = 0;
|
|
17
|
+
while (i < lines.length) {
|
|
18
|
+
const line = lines[i];
|
|
19
|
+
// Look for numbered failure markers (e.g., "1) Test name")
|
|
20
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Jasmine test framework output (controlled output), not user input
|
|
21
|
+
const failureMatch = /^(\d+)\)\s+(.+)$/.exec(line);
|
|
22
|
+
if (failureMatch) {
|
|
23
|
+
// failureMatch[1] contains the failure number (not used - line number extracted from stack trace instead)
|
|
24
|
+
const testName = failureMatch[2].trim();
|
|
25
|
+
let j = i + 1;
|
|
26
|
+
let message;
|
|
27
|
+
let errorType;
|
|
28
|
+
let file;
|
|
29
|
+
let lineNumber;
|
|
30
|
+
// Scan for Message: and Stack: sections
|
|
31
|
+
while (j < lines.length && j < i + 30) {
|
|
32
|
+
const nextLine = lines[j];
|
|
33
|
+
// Stop if we hit the next failure
|
|
34
|
+
if (/^\d+\)\s+/.exec(nextLine)) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
// Extract message (comes after " Message:" line)
|
|
38
|
+
if (nextLine.trim() === 'Message:') {
|
|
39
|
+
j++;
|
|
40
|
+
// Collect message lines until we hit "Stack:" or empty line
|
|
41
|
+
const messageLines = [];
|
|
42
|
+
while (j < lines.length) {
|
|
43
|
+
const msgLine = lines[j];
|
|
44
|
+
if (msgLine.trim() === 'Stack:' || msgLine.trim() === '') {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
messageLines.push(msgLine.trim());
|
|
48
|
+
j++;
|
|
49
|
+
}
|
|
50
|
+
message = messageLines.join(' ').trim();
|
|
51
|
+
// Extract error type if present (e.g., "TypeError:", "Error:")
|
|
52
|
+
const errorMatch = /^([A-Za-z]*Error):\s*/.exec(message);
|
|
53
|
+
if (errorMatch) {
|
|
54
|
+
errorType = errorMatch[1];
|
|
55
|
+
}
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
// Extract file location from stack trace
|
|
59
|
+
if (nextLine.trim() === 'Stack:') {
|
|
60
|
+
j++;
|
|
61
|
+
// Scan stack trace for file location
|
|
62
|
+
while (j < lines.length && j < i + 40) {
|
|
63
|
+
const stackLine = lines[j];
|
|
64
|
+
// Stop if we hit the next failure or empty section
|
|
65
|
+
if (/^\d+\)\s+/.exec(stackLine) || (stackLine.trim() === '' && /^\d+\)\s+/.exec(lines[j + 1] ?? ''))) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
// Extract file from UserContext.<anonymous> stack lines
|
|
69
|
+
if (stackLine.includes('UserContext.<anonymous>')) {
|
|
70
|
+
const locationMatch = /UserContext\.<anonymous> \(([^:)]+):(\d+)(?::(\d+))?\)/.exec(stackLine);
|
|
71
|
+
if (locationMatch) {
|
|
72
|
+
file = locationMatch[1];
|
|
73
|
+
lineNumber = Number.parseInt(locationMatch[2], 10);
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// Also try Object.* patterns
|
|
78
|
+
if (!file && stackLine.includes(' (') && stackLine.includes('.js:')) {
|
|
79
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Jasmine test framework stack traces (controlled output), not user input
|
|
80
|
+
const altMatch = /\(([^:)]+):(\d+)(?::(\d+))?\)/.exec(stackLine);
|
|
81
|
+
if (altMatch) {
|
|
82
|
+
file = altMatch[1];
|
|
83
|
+
lineNumber = Number.parseInt(altMatch[2], 10);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
j++;
|
|
88
|
+
}
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
j++;
|
|
92
|
+
}
|
|
93
|
+
failures.push({
|
|
94
|
+
testName,
|
|
95
|
+
message,
|
|
96
|
+
errorType,
|
|
97
|
+
file,
|
|
98
|
+
line: lineNumber
|
|
99
|
+
});
|
|
100
|
+
i = j; // Skip to after this failure
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
i++;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return failures;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Extract errors from Jasmine test output
|
|
110
|
+
*
|
|
111
|
+
* @param output - Jasmine text output
|
|
112
|
+
* @returns Structured error information
|
|
113
|
+
*/
|
|
114
|
+
function extract(output) {
|
|
115
|
+
// Check if this looks like Jasmine output
|
|
116
|
+
if (!output.includes('spec') && !output.includes('Failures:')) {
|
|
117
|
+
return {
|
|
118
|
+
summary: 'Unable to parse Jasmine output - invalid format',
|
|
119
|
+
errors: [],
|
|
120
|
+
totalErrors: 0,
|
|
121
|
+
errorSummary: output.trim(),
|
|
122
|
+
guidance: 'Ensure the input is valid Jasmine test output',
|
|
123
|
+
metadata: {
|
|
124
|
+
confidence: 0,
|
|
125
|
+
completeness: 0,
|
|
126
|
+
issues: ['Not Jasmine output format']
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
// Extract failure count
|
|
131
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Jasmine test framework summary (controlled output), not user input
|
|
132
|
+
const failureMatch = /(\d+) spec(?:s)?, (\d+) failure(?:s)?/.exec(output);
|
|
133
|
+
const failureCount = failureMatch ? Number.parseInt(failureMatch[2], 10) : 0;
|
|
134
|
+
// Extract all failures
|
|
135
|
+
const failures = extractFailures(output);
|
|
136
|
+
// Early return if no failures detected (but failure count suggested there should be)
|
|
137
|
+
if (failureCount === 0 && failures.length === 0) {
|
|
138
|
+
return processTestFailures([], 95);
|
|
139
|
+
}
|
|
140
|
+
// Process failures using shared utility
|
|
141
|
+
return processTestFailures(failures, 95);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Detect if output is from Jasmine test framework
|
|
145
|
+
*
|
|
146
|
+
* @param output - Command output to analyze
|
|
147
|
+
* @returns Detection result with confidence and patterns
|
|
148
|
+
*/
|
|
149
|
+
function detect(output) {
|
|
150
|
+
// Require "spec" to avoid false positives on Maven output (which has "Failures:")
|
|
151
|
+
const hasSpec = output.includes('spec');
|
|
152
|
+
const hasFailures = output.includes('Failures:');
|
|
153
|
+
// Strong signal: both spec and Failures: present
|
|
154
|
+
if (hasSpec && hasFailures) {
|
|
155
|
+
return {
|
|
156
|
+
confidence: 90,
|
|
157
|
+
patterns: ['spec', 'Failures:'],
|
|
158
|
+
reason: 'Jasmine test framework output detected (spec + Failures)',
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
// Weak signal: only spec (could be other frameworks)
|
|
162
|
+
if (hasSpec) {
|
|
163
|
+
return {
|
|
164
|
+
confidence: 60,
|
|
165
|
+
patterns: ['spec'],
|
|
166
|
+
reason: 'Possible Jasmine output (spec keyword found)',
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return { confidence: 0, patterns: [], reason: '' };
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Sample test cases for Jasmine extractor
|
|
173
|
+
*/
|
|
174
|
+
const samples = [
|
|
175
|
+
{
|
|
176
|
+
name: 'single-assertion-error',
|
|
177
|
+
description: 'Single Jasmine test failure with assertion error',
|
|
178
|
+
input: `
|
|
179
|
+
Started
|
|
180
|
+
F
|
|
181
|
+
|
|
182
|
+
Failures:
|
|
183
|
+
1) Vibe-Validate Jasmine Test Matrix Failure Type 1: Assertion Errors should match expected value
|
|
184
|
+
Message:
|
|
185
|
+
Expected 4 to equal 5.
|
|
186
|
+
Stack:
|
|
187
|
+
at <Jasmine>
|
|
188
|
+
at UserContext.<anonymous> (/private/tmp/jasmine-comprehensive.test.js:9:17)
|
|
189
|
+
at <Jasmine>
|
|
190
|
+
|
|
191
|
+
1 spec, 1 failure
|
|
192
|
+
Finished in 0.037 seconds
|
|
193
|
+
`,
|
|
194
|
+
expectedErrors: 1,
|
|
195
|
+
expectedPatterns: ['Expected 4 to equal 5'],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'multiple-test-failures',
|
|
199
|
+
description: 'Multiple Jasmine test failures with different error types',
|
|
200
|
+
input: `
|
|
201
|
+
Started
|
|
202
|
+
FFF
|
|
203
|
+
|
|
204
|
+
Failures:
|
|
205
|
+
1) Suite > Test 1
|
|
206
|
+
Message:
|
|
207
|
+
Expected 1 to equal 2.
|
|
208
|
+
Stack:
|
|
209
|
+
at UserContext.<anonymous> (test.js:10:15)
|
|
210
|
+
|
|
211
|
+
2) Suite > Test 2
|
|
212
|
+
Message:
|
|
213
|
+
TypeError: Cannot read properties of null
|
|
214
|
+
Stack:
|
|
215
|
+
at UserContext.<anonymous> (test.js:20:15)
|
|
216
|
+
|
|
217
|
+
3) Suite > Test 3
|
|
218
|
+
Message:
|
|
219
|
+
Error: ENOENT: no such file or directory
|
|
220
|
+
Stack:
|
|
221
|
+
at UserContext.<anonymous> (test.js:30:15)
|
|
222
|
+
|
|
223
|
+
3 specs, 3 failures
|
|
224
|
+
`,
|
|
225
|
+
expectedErrors: 3,
|
|
226
|
+
expectedPatterns: ['Expected 1 to equal 2', 'TypeError', 'ENOENT'],
|
|
227
|
+
},
|
|
228
|
+
];
|
|
229
|
+
/**
|
|
230
|
+
* Jasmine Error Extractor Plugin
|
|
231
|
+
*
|
|
232
|
+
* Extracts Jasmine test framework errors with 85% confidence.
|
|
233
|
+
* Parses Message: and Stack: sections with structured format.
|
|
234
|
+
*/
|
|
235
|
+
const jasminePlugin = {
|
|
236
|
+
metadata: {
|
|
237
|
+
name: 'jasmine',
|
|
238
|
+
version: '1.0.0',
|
|
239
|
+
author: 'vibe-validate',
|
|
240
|
+
description: 'Extracts Jasmine test framework errors',
|
|
241
|
+
repository: 'https://github.com/jdutton/vibe-validate',
|
|
242
|
+
tags: ['jasmine', 'testing', 'javascript'],
|
|
243
|
+
},
|
|
244
|
+
hints: {
|
|
245
|
+
required: ['spec'],
|
|
246
|
+
anyOf: ['Failures:'],
|
|
247
|
+
},
|
|
248
|
+
priority: 90, // Updated to match highest confidence
|
|
249
|
+
detect,
|
|
250
|
+
extract,
|
|
251
|
+
samples,
|
|
252
|
+
};
|
|
253
|
+
export default jasminePlugin;
|
|
254
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extractors/jasmine/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAAE,mBAAmB,EAAwB,MAAM,qCAAqC,CAAC;AAEhG;;GAEG;AACH,wLAAwL;AACxL,SAAS,eAAe,CAAC,MAAc;IACrC,MAAM,QAAQ,GAAsB,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC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rD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,GAAsB;IACjC;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,kDAAkD;QAC/D,KAAK,EAAE;;;;;;;;;;;;;;;CAeV;QACG,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,CAAC;KAC5C;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,2DAA2D;QACxE,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;CAwBV;QACG,cAAc,EAAE,CAAC;QACjB,gBAAgB,EAAE,CAAC,uBAAuB,EAAE,WAAW,EAAE,QAAQ,CAAC;KACnE;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,aAAa,GAAoB;IACrC,QAAQ,EAAE;QACR,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,eAAe;QACvB,WAAW,EAAE,wCAAwC;QACrD,UAAU,EAAE,0CAA0C;QACtD,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC;KAC3C;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,CAAC,MAAM,CAAC;QAClB,KAAK,EAAE,CAAC,WAAW,CAAC;KACrB;IACD,QAAQ,EAAE,EAAE,EAAE,sCAAsC;IACpD,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/extractors/jasmine/index.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jasmine Error Extractor Plugin Tests
|
|
3
|
+
*
|
|
4
|
+
* @package @vibe-validate/extractors
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect } from 'vitest';
|
|
7
|
+
import jasminePlugin from './index.js';
|
|
8
|
+
describe('jasmine extractor plugin', () => {
|
|
9
|
+
describe('detect', () => {
|
|
10
|
+
it('should detect Jasmine output with failures', () => {
|
|
11
|
+
const output = `
|
|
12
|
+
Failures:
|
|
13
|
+
1) Test
|
|
14
|
+
Message:
|
|
15
|
+
Expected true to be false
|
|
16
|
+
`;
|
|
17
|
+
const result = jasminePlugin.detect(output);
|
|
18
|
+
expect(result.confidence).toBe(0); // No "spec" keyword, so not detected
|
|
19
|
+
expect(result.reason).toBe('');
|
|
20
|
+
});
|
|
21
|
+
it('should detect Jasmine output with spec count', () => {
|
|
22
|
+
const output = `3 specs, 0 failures`;
|
|
23
|
+
const result = jasminePlugin.detect(output);
|
|
24
|
+
expect(result.confidence).toBe(60); // Only "spec" keyword, weak signal
|
|
25
|
+
});
|
|
26
|
+
it('should detect Jasmine output with both spec and Failures', () => {
|
|
27
|
+
const output = `
|
|
28
|
+
3 specs, 1 failure
|
|
29
|
+
Failures:
|
|
30
|
+
1) Test
|
|
31
|
+
Message:
|
|
32
|
+
Expected true to be false
|
|
33
|
+
`;
|
|
34
|
+
const result = jasminePlugin.detect(output);
|
|
35
|
+
expect(result.confidence).toBe(90); // Both "spec" and "Failures:", strong signal
|
|
36
|
+
expect(result.reason).toContain('spec + Failures');
|
|
37
|
+
});
|
|
38
|
+
it('should not detect non-Jasmine output', () => {
|
|
39
|
+
const output = 'Some random text without Jasmine patterns';
|
|
40
|
+
const result = jasminePlugin.detect(output);
|
|
41
|
+
expect(result.confidence).toBe(0);
|
|
42
|
+
});
|
|
43
|
+
it('should not detect Maven Surefire output (regression test)', () => {
|
|
44
|
+
// This was the actual Maven output that caused false positive detection
|
|
45
|
+
const mavenOutput = `[ERROR] Tests run: 10, Failures: 2, Errors: 0, Skipped: 0
|
|
46
|
+
[ERROR] com.example.FooTest.testBar -- Time elapsed: 0.123 s <<< FAILURE!
|
|
47
|
+
java.lang.AssertionError: Expected 5 but was 3
|
|
48
|
+
at com.example.FooTest.testBar(FooTest.java:42)
|
|
49
|
+
|
|
50
|
+
[INFO] Results:
|
|
51
|
+
[ERROR] Failures:
|
|
52
|
+
[ERROR] FooTest.testBar:42 Expected 5 but was 3`;
|
|
53
|
+
const result = jasminePlugin.detect(mavenOutput);
|
|
54
|
+
// Should NOT detect as Jasmine (no "spec" keyword)
|
|
55
|
+
expect(result.confidence).toBe(0);
|
|
56
|
+
expect(result.reason).toBe('');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
describe('extract', () => {
|
|
60
|
+
describe('Basic Extraction', () => {
|
|
61
|
+
it('should extract single test failure from Jasmine output', () => {
|
|
62
|
+
const input = `
|
|
63
|
+
Started
|
|
64
|
+
F
|
|
65
|
+
|
|
66
|
+
Failures:
|
|
67
|
+
1) Vibe-Validate Jasmine Test Matrix Failure Type 1: Assertion Errors should match expected value
|
|
68
|
+
Message:
|
|
69
|
+
Expected 4 to equal 5.
|
|
70
|
+
Stack:
|
|
71
|
+
at <Jasmine>
|
|
72
|
+
at UserContext.<anonymous> (/private/tmp/jasmine-comprehensive.test.js:9:17)
|
|
73
|
+
at <Jasmine>
|
|
74
|
+
|
|
75
|
+
1 spec, 1 failure
|
|
76
|
+
Finished in 0.037 seconds
|
|
77
|
+
`;
|
|
78
|
+
const result = jasminePlugin.extract(input);
|
|
79
|
+
expect(result.summary).toBe('1 test(s) failed');
|
|
80
|
+
expect(result.errors).toHaveLength(1);
|
|
81
|
+
expect(result.errors[0]).toMatchObject({
|
|
82
|
+
// eslint-disable-next-line sonarjs/publicly-writable-directories -- Test fixture path, not actual file operation
|
|
83
|
+
file: '/private/tmp/jasmine-comprehensive.test.js',
|
|
84
|
+
line: 9,
|
|
85
|
+
message: 'Expected 4 to equal 5.'
|
|
86
|
+
});
|
|
87
|
+
expect(result.errors[0].context).toContain('should match expected value');
|
|
88
|
+
});
|
|
89
|
+
it('should extract multiple test failures', () => {
|
|
90
|
+
const input = `
|
|
91
|
+
Started
|
|
92
|
+
FFF
|
|
93
|
+
|
|
94
|
+
Failures:
|
|
95
|
+
1) Suite > Test 1
|
|
96
|
+
Message:
|
|
97
|
+
Expected 1 to equal 2.
|
|
98
|
+
Stack:
|
|
99
|
+
at UserContext.<anonymous> (test.js:10:15)
|
|
100
|
+
|
|
101
|
+
2) Suite > Test 2
|
|
102
|
+
Message:
|
|
103
|
+
Expected 3 to equal 4.
|
|
104
|
+
Stack:
|
|
105
|
+
at UserContext.<anonymous> (test.js:20:15)
|
|
106
|
+
|
|
107
|
+
3) Suite > Test 3
|
|
108
|
+
Message:
|
|
109
|
+
Expected 5 to equal 6.
|
|
110
|
+
Stack:
|
|
111
|
+
at UserContext.<anonymous> (test.js:30:15)
|
|
112
|
+
|
|
113
|
+
3 specs, 3 failures
|
|
114
|
+
`;
|
|
115
|
+
const result = jasminePlugin.extract(input);
|
|
116
|
+
expect(result.summary).toBe('3 test(s) failed');
|
|
117
|
+
expect(result.errors).toHaveLength(3);
|
|
118
|
+
expect(result.errors[0].line).toBe(10);
|
|
119
|
+
expect(result.errors[1].line).toBe(20);
|
|
120
|
+
expect(result.errors[2].line).toBe(30);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
describe('Error Type Detection', () => {
|
|
124
|
+
it('should detect assertion errors', () => {
|
|
125
|
+
const input = `
|
|
126
|
+
Failures:
|
|
127
|
+
1) Test
|
|
128
|
+
Message:
|
|
129
|
+
Expected 'number' to equal 'string'.
|
|
130
|
+
Stack:
|
|
131
|
+
at UserContext.<anonymous> (test.js:10:14)
|
|
132
|
+
|
|
133
|
+
1 spec, 1 failure
|
|
134
|
+
`;
|
|
135
|
+
const result = jasminePlugin.extract(input);
|
|
136
|
+
expect(result.errors[0].message).toContain('Expected');
|
|
137
|
+
});
|
|
138
|
+
it('should detect TypeError', () => {
|
|
139
|
+
const input = `
|
|
140
|
+
Failures:
|
|
141
|
+
1) Test
|
|
142
|
+
Message:
|
|
143
|
+
TypeError: Cannot read properties of null (reading 'foo')
|
|
144
|
+
Stack:
|
|
145
|
+
at UserContext.<anonymous> (test.js:15:20)
|
|
146
|
+
|
|
147
|
+
1 spec, 1 failure
|
|
148
|
+
`;
|
|
149
|
+
const result = jasminePlugin.extract(input);
|
|
150
|
+
expect(result.errors[0].message).toContain('Cannot read properties of null');
|
|
151
|
+
});
|
|
152
|
+
it('should detect ENOENT errors', () => {
|
|
153
|
+
const input = `
|
|
154
|
+
Failures:
|
|
155
|
+
1) Test
|
|
156
|
+
Message:
|
|
157
|
+
Error: ENOENT: no such file or directory
|
|
158
|
+
Stack:
|
|
159
|
+
at Object.readFileSync (node:fs:435:20)
|
|
160
|
+
at UserContext.<anonymous> (test.js:20:10)
|
|
161
|
+
|
|
162
|
+
1 spec, 1 failure
|
|
163
|
+
`;
|
|
164
|
+
const result = jasminePlugin.extract(input);
|
|
165
|
+
expect(result.errors[0].message).toContain('ENOENT');
|
|
166
|
+
});
|
|
167
|
+
it('should detect timeout errors', () => {
|
|
168
|
+
const input = `
|
|
169
|
+
Failures:
|
|
170
|
+
1) Test
|
|
171
|
+
Message:
|
|
172
|
+
Error: Timeout - Async function did not complete within 100ms
|
|
173
|
+
Stack:
|
|
174
|
+
at <Jasmine>
|
|
175
|
+
at listOnTimeout (node:internal/timers:608:17)
|
|
176
|
+
|
|
177
|
+
1 spec, 1 failure
|
|
178
|
+
`;
|
|
179
|
+
const result = jasminePlugin.extract(input);
|
|
180
|
+
expect(result.errors[0].message).toContain('Timeout');
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
describe('Location Extraction', () => {
|
|
184
|
+
it('should extract file:line:column format', () => {
|
|
185
|
+
const input = `
|
|
186
|
+
Failures:
|
|
187
|
+
1) Test
|
|
188
|
+
Message:
|
|
189
|
+
Error: Test error
|
|
190
|
+
Stack:
|
|
191
|
+
at UserContext.<anonymous> (/path/to/test.js:42:15)
|
|
192
|
+
|
|
193
|
+
1 spec, 1 failure
|
|
194
|
+
`;
|
|
195
|
+
const result = jasminePlugin.extract(input);
|
|
196
|
+
expect(result.errors[0].file).toBe('/path/to/test.js');
|
|
197
|
+
expect(result.errors[0].line).toBe(42);
|
|
198
|
+
});
|
|
199
|
+
it('should handle relative paths', () => {
|
|
200
|
+
const input = `
|
|
201
|
+
Failures:
|
|
202
|
+
1) Test
|
|
203
|
+
Message:
|
|
204
|
+
Error: Test error
|
|
205
|
+
Stack:
|
|
206
|
+
at UserContext.<anonymous> (tests/unit/helpers.test.js:128:30)
|
|
207
|
+
|
|
208
|
+
1 spec, 1 failure
|
|
209
|
+
`;
|
|
210
|
+
const result = jasminePlugin.extract(input);
|
|
211
|
+
expect(result.errors[0].file).toBe('tests/unit/helpers.test.js');
|
|
212
|
+
expect(result.errors[0].line).toBe(128);
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
describe('Test Hierarchy', () => {
|
|
216
|
+
it('should preserve nested describe blocks', () => {
|
|
217
|
+
const input = `
|
|
218
|
+
Failures:
|
|
219
|
+
1) Vibe-Validate Jasmine Test Matrix Failure Type 10: Nested Describe Blocks Level 2 Level 3 should work at deep nesting
|
|
220
|
+
Message:
|
|
221
|
+
Expected true to be false.
|
|
222
|
+
Stack:
|
|
223
|
+
at UserContext.<anonymous> (/tmp/test.js:72:24)
|
|
224
|
+
|
|
225
|
+
1 spec, 1 failure
|
|
226
|
+
`;
|
|
227
|
+
const result = jasminePlugin.extract(input);
|
|
228
|
+
expect(result.errors[0].context).toContain('Nested Describe Blocks');
|
|
229
|
+
expect(result.errors[0].context).toContain('Level 2');
|
|
230
|
+
expect(result.errors[0].context).toContain('Level 3');
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
describe('Edge Cases', () => {
|
|
234
|
+
it('should handle output with no failures', () => {
|
|
235
|
+
const input = `
|
|
236
|
+
Started
|
|
237
|
+
...
|
|
238
|
+
|
|
239
|
+
3 specs, 0 failures
|
|
240
|
+
Finished in 0.037 seconds
|
|
241
|
+
`;
|
|
242
|
+
const result = jasminePlugin.extract(input);
|
|
243
|
+
expect(result.summary).toBe('0 test(s) failed');
|
|
244
|
+
expect(result.errors).toHaveLength(0);
|
|
245
|
+
});
|
|
246
|
+
it('should handle missing stack trace', () => {
|
|
247
|
+
const input = `
|
|
248
|
+
Failures:
|
|
249
|
+
1) Test
|
|
250
|
+
Message:
|
|
251
|
+
Something went wrong
|
|
252
|
+
Stack:
|
|
253
|
+
|
|
254
|
+
1 spec, 1 failure
|
|
255
|
+
`;
|
|
256
|
+
const result = jasminePlugin.extract(input);
|
|
257
|
+
expect(result.errors[0].message).toContain('Something went wrong');
|
|
258
|
+
expect(result.errors[0].file).toBe('unknown');
|
|
259
|
+
});
|
|
260
|
+
it('should handle malformed output gracefully', () => {
|
|
261
|
+
const input = 'Some random text that is not Jasmine output';
|
|
262
|
+
const result = jasminePlugin.extract(input);
|
|
263
|
+
expect(result.summary).toContain('Unable to parse');
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
describe('Guidance Generation', () => {
|
|
267
|
+
it('should provide assertion error guidance', () => {
|
|
268
|
+
const input = `
|
|
269
|
+
Failures:
|
|
270
|
+
1) Test
|
|
271
|
+
Message:
|
|
272
|
+
Expected 4 to equal 5.
|
|
273
|
+
Stack:
|
|
274
|
+
at UserContext.<anonymous> (test.js:10:14)
|
|
275
|
+
|
|
276
|
+
1 spec, 1 failure
|
|
277
|
+
`;
|
|
278
|
+
const result = jasminePlugin.extract(input);
|
|
279
|
+
expect(result.guidance).toContain('assertion');
|
|
280
|
+
});
|
|
281
|
+
it('should provide timeout guidance', () => {
|
|
282
|
+
const input = `
|
|
283
|
+
Failures:
|
|
284
|
+
1) Test
|
|
285
|
+
Message:
|
|
286
|
+
Error: Timeout - Async function did not complete within 100ms
|
|
287
|
+
Stack:
|
|
288
|
+
at listOnTimeout (node:internal/timers:608:17)
|
|
289
|
+
|
|
290
|
+
1 spec, 1 failure
|
|
291
|
+
`;
|
|
292
|
+
const result = jasminePlugin.extract(input);
|
|
293
|
+
expect(result.guidance).toContain('timeout');
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
describe('Quality Metadata', () => {
|
|
297
|
+
it('should include extraction metadata', () => {
|
|
298
|
+
const input = `
|
|
299
|
+
Failures:
|
|
300
|
+
1) Test
|
|
301
|
+
Message:
|
|
302
|
+
Expected 4 to equal 5.
|
|
303
|
+
Stack:
|
|
304
|
+
at UserContext.<anonymous> (test.js:10:14)
|
|
305
|
+
|
|
306
|
+
1 spec, 1 failure
|
|
307
|
+
`;
|
|
308
|
+
const result = jasminePlugin.extract(input);
|
|
309
|
+
expect(result.metadata).toBeDefined();
|
|
310
|
+
expect(result.metadata.confidence).toBeGreaterThan(90);
|
|
311
|
+
expect(result.metadata.completeness).toBe(100);
|
|
312
|
+
expect(result.metadata.issues).toEqual([]);
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
describe('samples', () => {
|
|
317
|
+
it('should have at least 2 sample test cases', () => {
|
|
318
|
+
expect(jasminePlugin.samples).toBeDefined();
|
|
319
|
+
expect(jasminePlugin.samples.length).toBeGreaterThanOrEqual(2);
|
|
320
|
+
});
|
|
321
|
+
it('should successfully parse all sample inputs', () => {
|
|
322
|
+
for (const sample of jasminePlugin.samples) {
|
|
323
|
+
const result = jasminePlugin.extract(sample.input);
|
|
324
|
+
expect(result.errors.length).toBeGreaterThan(0);
|
|
325
|
+
expect(result.errors.length).toBe(sample.expectedErrors);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
describe('metadata', () => {
|
|
330
|
+
it('should have complete plugin metadata', () => {
|
|
331
|
+
expect(jasminePlugin.metadata.name).toBe('jasmine');
|
|
332
|
+
expect(jasminePlugin.metadata.version).toBe('1.0.0');
|
|
333
|
+
expect(jasminePlugin.metadata.description).toBeTruthy();
|
|
334
|
+
expect(jasminePlugin.metadata.tags).toContain('jasmine');
|
|
335
|
+
});
|
|
336
|
+
it('should have appropriate priority', () => {
|
|
337
|
+
expect(jasminePlugin.priority).toBe(90);
|
|
338
|
+
});
|
|
339
|
+
it('should have detection hints', () => {
|
|
340
|
+
expect(jasminePlugin.hints.required).toContain('spec');
|
|
341
|
+
expect(jasminePlugin.hints.anyOf).toContain('Failures:');
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/extractors/jasmine/index.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,aAAa,MAAM,YAAY,CAAC;AAEvC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,MAAM,GAAG;;;;;CAKpB,CAAC;YACI,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,qCAAqC;YACxE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;YACtD,MAAM,MAAM,GAAG,qBAAqB,CAAC;YACrC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC;QACzE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;YAClE,MAAM,MAAM,GAAG;;;;;;CAMpB,CAAC;YACI,MAAM,MAAM,GAAG,aAA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,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,CAAC,aAAa,CAAC,KAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACxD,MAAM,CAAC,aAAa,CAAC,KAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jest Error Extractor Plugin
|
|
3
|
+
*
|
|
4
|
+
* Parses and formats Jest test failure output for LLM consumption.
|
|
5
|
+
*
|
|
6
|
+
* @package @vibe-validate/extractors
|
|
7
|
+
*/
|
|
8
|
+
import type { ExtractorPlugin } from '../../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Jest Error Extractor Plugin
|
|
11
|
+
*
|
|
12
|
+
* Extracts Jest test failures with high confidence (90%).
|
|
13
|
+
* Supports inline (✕) and detailed (●) failure formats.
|
|
14
|
+
*/
|
|
15
|
+
declare const jestPlugin: ExtractorPlugin;
|
|
16
|
+
export default jestPlugin;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extractors/jest/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,gBAAgB,CAAC;AA0SxB;;;;;GAKG;AACH,QAAA,MAAM,UAAU,EAAE,eAiBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|