@vibe-validate/extractors 0.14.2 → 0.14.3
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/ava-extractor.js +31 -35
- package/dist/ava-extractor.js.map +1 -1
- package/dist/eslint-extractor.d.ts.map +1 -1
- package/dist/eslint-extractor.js +9 -8
- package/dist/eslint-extractor.js.map +1 -1
- package/dist/jasmine-extractor.d.ts.map +1 -1
- package/dist/jasmine-extractor.js +19 -14
- package/dist/jasmine-extractor.js.map +1 -1
- package/dist/jest-extractor.d.ts.map +1 -1
- package/dist/jest-extractor.js +117 -63
- package/dist/jest-extractor.js.map +1 -1
- package/dist/junit-extractor.d.ts.map +1 -1
- package/dist/junit-extractor.js +35 -44
- package/dist/junit-extractor.js.map +1 -1
- package/dist/mocha-extractor.d.ts.map +1 -1
- package/dist/mocha-extractor.js +20 -15
- package/dist/mocha-extractor.js.map +1 -1
- package/dist/playwright-extractor.d.ts.map +1 -1
- package/dist/playwright-extractor.js +19 -9
- package/dist/playwright-extractor.js.map +1 -1
- package/dist/smart-extractor.d.ts +4 -4
- package/dist/smart-extractor.d.ts.map +1 -1
- package/dist/smart-extractor.js +59 -48
- package/dist/smart-extractor.js.map +1 -1
- package/dist/tap-extractor.js +14 -9
- package/dist/tap-extractor.js.map +1 -1
- package/dist/typescript-extractor.d.ts.map +1 -1
- package/dist/typescript-extractor.js +6 -4
- package/dist/typescript-extractor.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -1
- package/dist/utils.js.map +1 -1
- package/dist/vitest-extractor.d.ts.map +1 -1
- package/dist/vitest-extractor.js +280 -160
- package/dist/vitest-extractor.js.map +1 -1
- package/package.json +1 -1
package/dist/jest-extractor.js
CHANGED
|
@@ -5,6 +5,109 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @package @vibe-validate/extractors
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Match FAIL line and extract file path
|
|
10
|
+
*/
|
|
11
|
+
function matchFailLine(line) {
|
|
12
|
+
const failMatch = /^\s*FAIL\s+(?:[\w-]+\s+)?([\w/-]+\.test\.\w+)/.exec(line);
|
|
13
|
+
return failMatch ? failMatch[1] : null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Match inline failure (✕) and extract test name
|
|
17
|
+
*/
|
|
18
|
+
function matchInlineFailure(line) {
|
|
19
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Jest test framework output (controlled output), not user input
|
|
20
|
+
const failureMatch = /^\s+✕\s+(.+?)(?:\s+\(\d+\s*ms\))?$/.exec(line);
|
|
21
|
+
return failureMatch ? failureMatch[1].trim() : null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Match detailed test format (●) and extract hierarchy
|
|
25
|
+
*/
|
|
26
|
+
function matchDetailedTest(line) {
|
|
27
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Jest test framework output (controlled output), not user input
|
|
28
|
+
const detailedTestMatch = /^\s*●\s+(.+)$/.exec(line);
|
|
29
|
+
return detailedTestMatch ? detailedTestMatch[1].trim() : null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Match test suite line and extract suite info
|
|
33
|
+
*/
|
|
34
|
+
function matchSuiteLine(line) {
|
|
35
|
+
const suiteMatch = /^\s+([A-Z][\w\s›-]+)$/.exec(line);
|
|
36
|
+
if (!suiteMatch || line.includes('✕') || line.includes('✓') || line.includes('ms)')) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const indentMatch = /^(\s*)/.exec(line);
|
|
40
|
+
const indent = indentMatch ? indentMatch[1].length : 0;
|
|
41
|
+
return { name: suiteMatch[1].trim(), indent };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Adjust hierarchy stack based on indentation level
|
|
45
|
+
*/
|
|
46
|
+
function adjustHierarchyForIndent(hierarchyStack, indent) {
|
|
47
|
+
while (hierarchyStack.length > 0 && indent <= hierarchyStack.length * 2) {
|
|
48
|
+
hierarchyStack.pop();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Process a single line of Jest output
|
|
53
|
+
*/
|
|
54
|
+
function processLine(line, currentFile, hierarchyStack) {
|
|
55
|
+
const result = {};
|
|
56
|
+
// Check for FAIL line
|
|
57
|
+
const newFile = matchFailLine(line);
|
|
58
|
+
if (newFile) {
|
|
59
|
+
result.newFile = newFile;
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
// Skip lines before we have a file
|
|
63
|
+
if (!currentFile) {
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
// Check for inline failure (✕)
|
|
67
|
+
const inlineTest = matchInlineFailure(line);
|
|
68
|
+
if (inlineTest) {
|
|
69
|
+
const fullHierarchy = hierarchyStack.length > 0
|
|
70
|
+
? [...hierarchyStack, inlineTest].join(' › ')
|
|
71
|
+
: inlineTest;
|
|
72
|
+
result.failure = {
|
|
73
|
+
file: currentFile,
|
|
74
|
+
location: currentFile,
|
|
75
|
+
testHierarchy: fullHierarchy,
|
|
76
|
+
errorMessage: 'Test failed'
|
|
77
|
+
};
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
// Check for detailed test format (●)
|
|
81
|
+
const detailedHierarchy = matchDetailedTest(line);
|
|
82
|
+
if (detailedHierarchy) {
|
|
83
|
+
result.failure = {
|
|
84
|
+
file: currentFile,
|
|
85
|
+
location: currentFile,
|
|
86
|
+
testHierarchy: detailedHierarchy,
|
|
87
|
+
errorMessage: 'Test failed'
|
|
88
|
+
};
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
// Check for suite line
|
|
92
|
+
const suiteInfo = matchSuiteLine(line);
|
|
93
|
+
if (suiteInfo) {
|
|
94
|
+
result.newSuite = suiteInfo;
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Format failures into clean output string
|
|
100
|
+
*/
|
|
101
|
+
function formatJestFailures(failures) {
|
|
102
|
+
const cleanOutputLines = [];
|
|
103
|
+
for (const failure of failures) {
|
|
104
|
+
cleanOutputLines.push(`● ${failure.testHierarchy}`);
|
|
105
|
+
cleanOutputLines.push(` ${failure.errorMessage}`);
|
|
106
|
+
cleanOutputLines.push(` Location: ${failure.location}`);
|
|
107
|
+
cleanOutputLines.push('');
|
|
108
|
+
}
|
|
109
|
+
return cleanOutputLines.join('\n');
|
|
110
|
+
}
|
|
8
111
|
/**
|
|
9
112
|
* Extract Jest test failures
|
|
10
113
|
*
|
|
@@ -29,70 +132,28 @@ export function extractJestErrors(output) {
|
|
|
29
132
|
const lines = output.split('\n');
|
|
30
133
|
const failures = [];
|
|
31
134
|
let currentFile = '';
|
|
32
|
-
const hierarchyStack = [];
|
|
33
|
-
for (
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const failMatch = line.match(/^\s*FAIL\s+(?:[\w-]+\s+)?([\w/-]+\.test\.\w+)/);
|
|
39
|
-
if (failMatch) {
|
|
40
|
-
currentFile = failMatch[1];
|
|
41
|
-
hierarchyStack.length = 0; // Reset hierarchy for new file
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
if (!currentFile)
|
|
45
|
-
continue; // Skip lines before FAIL
|
|
46
|
-
// Calculate indentation level (number of leading spaces)
|
|
47
|
-
const indentMatch = line.match(/^(\s*)/);
|
|
48
|
-
const indent = indentMatch ? indentMatch[1].length : 0;
|
|
49
|
-
// Match: ✕ test name (6 ms) - inline failure
|
|
50
|
-
const failureMatch = line.match(/^\s+✕\s+(.+?)(?:\s+\(\d+\s*ms\))?$/);
|
|
51
|
-
if (failureMatch) {
|
|
52
|
-
const testName = failureMatch[1].trim();
|
|
53
|
-
// Build full hierarchy: parent suites + test name
|
|
54
|
-
const fullHierarchy = hierarchyStack.length > 0
|
|
55
|
-
? [...hierarchyStack, testName].join(' › ')
|
|
56
|
-
: testName;
|
|
57
|
-
failures.push({
|
|
58
|
-
file: currentFile,
|
|
59
|
-
location: currentFile,
|
|
60
|
-
testHierarchy: fullHierarchy,
|
|
61
|
-
errorMessage: 'Test failed'
|
|
62
|
-
});
|
|
135
|
+
const hierarchyStack = [];
|
|
136
|
+
for (const line of lines) {
|
|
137
|
+
const result = processLine(line, currentFile, hierarchyStack);
|
|
138
|
+
if (result.newFile) {
|
|
139
|
+
currentFile = result.newFile;
|
|
140
|
+
hierarchyStack.length = 0;
|
|
63
141
|
continue;
|
|
64
142
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (detailedTestMatch) {
|
|
68
|
-
const fullHierarchy = detailedTestMatch[1].trim();
|
|
69
|
-
failures.push({
|
|
70
|
-
file: currentFile,
|
|
71
|
-
location: currentFile,
|
|
72
|
-
testHierarchy: fullHierarchy,
|
|
73
|
-
errorMessage: 'Test failed'
|
|
74
|
-
});
|
|
143
|
+
if (result.failure) {
|
|
144
|
+
failures.push(result.failure);
|
|
75
145
|
continue;
|
|
76
146
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (suiteMatch && !line.includes('✕') && !line.includes('✓') && !line.includes('ms)')) {
|
|
81
|
-
const suiteName = suiteMatch[1].trim();
|
|
82
|
-
// Adjust hierarchy stack based on indentation
|
|
83
|
-
// If indent decreased, pop suites until we're at the right level
|
|
84
|
-
while (hierarchyStack.length > 0 && indent <= hierarchyStack.length * 2) {
|
|
85
|
-
hierarchyStack.pop();
|
|
86
|
-
}
|
|
87
|
-
// Add this suite to the stack
|
|
88
|
-
hierarchyStack.push(suiteName);
|
|
147
|
+
if (result.newSuite) {
|
|
148
|
+
adjustHierarchyForIndent(hierarchyStack, result.newSuite.indent);
|
|
149
|
+
hierarchyStack.push(result.newSuite.name);
|
|
89
150
|
}
|
|
90
151
|
}
|
|
91
152
|
// Build formatted errors
|
|
92
153
|
const errors = failures.map(f => ({
|
|
93
154
|
file: f.file,
|
|
94
|
-
line: parseInt(f.location.split(':')[1] || '0'),
|
|
95
|
-
column: parseInt(f.location.split(':')[2] || '0'),
|
|
155
|
+
line: Number.parseInt(f.location.split(':')[1] || '0'),
|
|
156
|
+
column: Number.parseInt(f.location.split(':')[2] || '0'),
|
|
96
157
|
message: `${f.testHierarchy}: ${f.errorMessage}`,
|
|
97
158
|
severity: 'error'
|
|
98
159
|
}));
|
|
@@ -102,19 +163,12 @@ export function extractJestErrors(output) {
|
|
|
102
163
|
const guidance = failures.length > 0
|
|
103
164
|
? 'Fix each failing test individually. Check test setup, mocks, and assertions.'
|
|
104
165
|
: '';
|
|
105
|
-
const cleanOutputLines = [];
|
|
106
|
-
for (const failure of failures) {
|
|
107
|
-
cleanOutputLines.push(`● ${failure.testHierarchy}`);
|
|
108
|
-
cleanOutputLines.push(` ${failure.errorMessage}`);
|
|
109
|
-
cleanOutputLines.push(` Location: ${failure.location}`);
|
|
110
|
-
cleanOutputLines.push('');
|
|
111
|
-
}
|
|
112
166
|
return {
|
|
113
167
|
errors,
|
|
114
168
|
summary,
|
|
115
169
|
totalCount: failures.length,
|
|
116
170
|
guidance,
|
|
117
|
-
cleanOutput:
|
|
171
|
+
cleanOutput: formatJestFailures(failures)
|
|
118
172
|
};
|
|
119
173
|
}
|
|
120
174
|
//# sourceMappingURL=jest-extractor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest-extractor.js","sourceRoot":"","sources":["../src/jest-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"jest-extractor.js","sourceRoot":"","sources":["../src/jest-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoBH;;GAEG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,SAAS,GAAG,+CAA+C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7E,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,C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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"junit-extractor.d.ts","sourceRoot":"","sources":["../src/junit-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAsC,MAAM,YAAY,CAAC;AAE3F;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"junit-extractor.d.ts","sourceRoot":"","sources":["../src/junit-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAsC,MAAM,YAAY,CAAC;AAE3F;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAgGvE"}
|
package/dist/junit-extractor.js
CHANGED
|
@@ -27,9 +27,10 @@ export function extractJUnitErrors(output) {
|
|
|
27
27
|
// Simple XML parsing - look for <testsuite> and <testcase> elements
|
|
28
28
|
isValidXml = parseSimpleXML(output);
|
|
29
29
|
}
|
|
30
|
-
catch (
|
|
30
|
+
catch (error) {
|
|
31
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
31
32
|
return {
|
|
32
|
-
summary:
|
|
33
|
+
summary: `Unable to parse JUnit XML - invalid format: ${errorMsg}`,
|
|
33
34
|
errors: [],
|
|
34
35
|
totalCount: 0,
|
|
35
36
|
cleanOutput: output.trim(),
|
|
@@ -60,10 +61,10 @@ export function extractJUnitErrors(output) {
|
|
|
60
61
|
const errors = [];
|
|
61
62
|
let completeCount = 0;
|
|
62
63
|
for (const failure of failures) {
|
|
63
|
-
const file = failure.file
|
|
64
|
-
const location = failure.location
|
|
65
|
-
const message = failure.message
|
|
66
|
-
const context = failure.testName
|
|
64
|
+
const file = failure.file ?? 'unknown';
|
|
65
|
+
const location = failure.location ?? `${file}:0`;
|
|
66
|
+
const message = failure.message ?? 'Test failed';
|
|
67
|
+
const context = failure.testName ?? '';
|
|
67
68
|
const isComplete = file !== 'unknown' && failure.location && message;
|
|
68
69
|
if (isComplete) {
|
|
69
70
|
completeCount++;
|
|
@@ -72,7 +73,7 @@ export function extractJUnitErrors(output) {
|
|
|
72
73
|
let line;
|
|
73
74
|
if (location) {
|
|
74
75
|
const locationParts = location.split(':');
|
|
75
|
-
line = locationParts[1] ? parseInt(locationParts[1], 10) : undefined;
|
|
76
|
+
line = locationParts[1] ? Number.parseInt(locationParts[1], 10) : undefined;
|
|
76
77
|
}
|
|
77
78
|
errors.push({
|
|
78
79
|
file,
|
|
@@ -119,66 +120,55 @@ function parseSimpleXML(xml) {
|
|
|
119
120
|
// Return that XML is valid
|
|
120
121
|
return true;
|
|
121
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Extract attribute value from XML tag
|
|
125
|
+
*/
|
|
126
|
+
function extractXmlAttribute(tag, attrName) {
|
|
127
|
+
const idx = tag.indexOf(`${attrName}="`);
|
|
128
|
+
if (idx === -1)
|
|
129
|
+
return undefined;
|
|
130
|
+
const start = idx + `${attrName}="`.length;
|
|
131
|
+
const end = tag.indexOf('"', start);
|
|
132
|
+
return tag.substring(start, end);
|
|
133
|
+
}
|
|
122
134
|
function extractFailures(xml) {
|
|
123
135
|
const failures = [];
|
|
124
|
-
// Match all <testcase> elements with <failure> children
|
|
125
136
|
const testcasePattern = /<testcase[^>]*>([\s\S]*?)<\/testcase>/g;
|
|
126
137
|
let testcaseMatch;
|
|
127
138
|
while ((testcaseMatch = testcasePattern.exec(xml)) !== null) {
|
|
128
139
|
const testcaseContent = testcaseMatch[0];
|
|
129
140
|
const testcaseInner = testcaseMatch[1];
|
|
130
|
-
//
|
|
141
|
+
// Skip passing tests
|
|
131
142
|
if (!testcaseInner.includes('<failure')) {
|
|
132
|
-
continue;
|
|
143
|
+
continue;
|
|
133
144
|
}
|
|
134
|
-
// Extract
|
|
135
|
-
const testcaseTagMatch =
|
|
145
|
+
// Extract testcase tag attributes
|
|
146
|
+
const testcaseTagMatch = /<testcase([^>]*)>/.exec(testcaseContent);
|
|
136
147
|
const testcaseTag = testcaseTagMatch ? testcaseTagMatch[1] : '';
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const classnameIdx = testcaseTag.indexOf('classname="');
|
|
140
|
-
if (classnameIdx !== -1) {
|
|
141
|
-
const start = classnameIdx + 'classname="'.length;
|
|
142
|
-
const end = testcaseTag.indexOf('"', start);
|
|
143
|
-
file = testcaseTag.substring(start, end);
|
|
144
|
-
}
|
|
145
|
-
// Extract name (test hierarchy) similarly
|
|
146
|
-
let testName;
|
|
147
|
-
const nameIdx = testcaseTag.indexOf('name="');
|
|
148
|
-
if (nameIdx !== -1) {
|
|
149
|
-
const start = nameIdx + 'name="'.length;
|
|
150
|
-
const end = testcaseTag.indexOf('"', start);
|
|
151
|
-
testName = testcaseTag.substring(start, end);
|
|
152
|
-
}
|
|
148
|
+
const file = extractXmlAttribute(testcaseTag, 'classname');
|
|
149
|
+
const testName = extractXmlAttribute(testcaseTag, 'name');
|
|
153
150
|
// Extract failure element
|
|
154
151
|
const failurePattern = /<failure[^>]*>([\s\S]*?)<\/failure>/;
|
|
155
|
-
const failureMatch =
|
|
152
|
+
const failureMatch = failurePattern.exec(testcaseInner);
|
|
156
153
|
if (!failureMatch) {
|
|
157
154
|
continue;
|
|
158
155
|
}
|
|
159
156
|
const failureContent = failureMatch[0];
|
|
160
157
|
const failureText = failureMatch[1];
|
|
161
|
-
// Extract
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
// Extract error type
|
|
165
|
-
const typeMatch = failureContent.match(/type="([^"]+)"/);
|
|
166
|
-
const errorType = typeMatch ? typeMatch[1] : undefined;
|
|
158
|
+
// Extract failure attributes
|
|
159
|
+
const message = extractXmlAttribute(failureContent, 'message');
|
|
160
|
+
const errorType = extractXmlAttribute(failureContent, 'type');
|
|
167
161
|
// Extract location from failure text (❯ file:line:column)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const locationPattern = /❯\s+([\w/._-]+):(\d+)(?::\d+)?/;
|
|
171
|
-
const locationMatch = failureText.match(locationPattern);
|
|
162
|
+
const locationPattern = /❯\s+([\w/.-]+):(\d+)(?::\d+)?/;
|
|
163
|
+
const locationMatch = locationPattern.exec(failureText);
|
|
172
164
|
let location;
|
|
173
165
|
let extractedFile;
|
|
174
166
|
if (locationMatch) {
|
|
175
167
|
extractedFile = locationMatch[1];
|
|
176
|
-
|
|
177
|
-
location = `${extractedFile}:${line}`;
|
|
168
|
+
location = `${extractedFile}:${locationMatch[2]}`;
|
|
178
169
|
}
|
|
179
|
-
// No fallback - if no location found in failure text, leave location undefined
|
|
180
170
|
failures.push({
|
|
181
|
-
file: extractedFile
|
|
171
|
+
file: extractedFile ?? file,
|
|
182
172
|
location,
|
|
183
173
|
message,
|
|
184
174
|
testName,
|
|
@@ -201,11 +191,12 @@ function decodeHtmlEntities(text) {
|
|
|
201
191
|
/**
|
|
202
192
|
* Generate guidance based on failure types
|
|
203
193
|
*/
|
|
194
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 16 acceptable for guidance generation (categorizes multiple error types and generates actionable suggestions)
|
|
204
195
|
function generateGuidance(failures) {
|
|
205
196
|
const guidances = [];
|
|
206
197
|
const seen = new Set();
|
|
207
198
|
for (const failure of failures) {
|
|
208
|
-
const message = failure.message
|
|
199
|
+
const message = failure.message ?? '';
|
|
209
200
|
const errorType = failure.errorType;
|
|
210
201
|
// Assertion errors
|
|
211
202
|
if (errorType === 'AssertionError' || message.includes('expected')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"junit-extractor.js","sourceRoot":"","sources":["../src/junit-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,gEAAgE;IAEhE,mBAAmB;IACnB,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,C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C,MAAM,EAAE,MAAM,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"mocha-extractor.d.ts","sourceRoot":"","sources":["../src/mocha-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAsC,MAAM,YAAY,CAAC;AAE3F;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAuFvE"}
|
package/dist/mocha-extractor.js
CHANGED
|
@@ -36,8 +36,9 @@ export function extractMochaErrors(output) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
// Extract failure count
|
|
39
|
-
|
|
40
|
-
const
|
|
39
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Mocha test framework summary (controlled output), not user input
|
|
40
|
+
const failingMatch = /(\d+) failing/.exec(output);
|
|
41
|
+
const failureCount = failingMatch ? Number.parseInt(failingMatch[1], 10) : 0;
|
|
41
42
|
if (failureCount === 0) {
|
|
42
43
|
return {
|
|
43
44
|
summary: '0 test(s) failed',
|
|
@@ -57,9 +58,9 @@ export function extractMochaErrors(output) {
|
|
|
57
58
|
const errors = [];
|
|
58
59
|
let completeCount = 0;
|
|
59
60
|
for (const failure of failures) {
|
|
60
|
-
const file = failure.file
|
|
61
|
-
const message = failure.message
|
|
62
|
-
const context = failure.testName
|
|
61
|
+
const file = failure.file ?? 'unknown';
|
|
62
|
+
const message = failure.message ?? 'Test failed';
|
|
63
|
+
const context = failure.testName ?? '';
|
|
63
64
|
const isComplete = file !== 'unknown' && failure.line && message;
|
|
64
65
|
if (isComplete) {
|
|
65
66
|
completeCount++;
|
|
@@ -95,6 +96,7 @@ export function extractMochaErrors(output) {
|
|
|
95
96
|
/**
|
|
96
97
|
* Extract failure information from Mocha output
|
|
97
98
|
*/
|
|
99
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 30 acceptable for Mocha output parsing (handles test hierarchies, error messages, and stack trace extraction)
|
|
98
100
|
function extractFailures(output) {
|
|
99
101
|
const failures = [];
|
|
100
102
|
const lines = output.split('\n');
|
|
@@ -103,7 +105,8 @@ function extractFailures(output) {
|
|
|
103
105
|
const line = lines[i];
|
|
104
106
|
// Look for numbered failure markers (e.g., " 1) ")
|
|
105
107
|
// Only match detailed format (2 spaces), not summary format (6+ spaces)
|
|
106
|
-
|
|
108
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Mocha test framework output (controlled output), not user input
|
|
109
|
+
const failureMatch = /^ {2}(\d+)\)\s+(.*)$/.exec(line);
|
|
107
110
|
if (failureMatch) {
|
|
108
111
|
// failureMatch[1] contains the failure number (not used - test name is more important)
|
|
109
112
|
const firstPart = failureMatch[2].trim();
|
|
@@ -125,11 +128,11 @@ function extractFailures(output) {
|
|
|
125
128
|
break;
|
|
126
129
|
}
|
|
127
130
|
// Error line marks end of hierarchy
|
|
128
|
-
if (
|
|
131
|
+
if (/^\s+(Error|AssertionError|TypeError)/.exec(nextLine)) {
|
|
129
132
|
break;
|
|
130
133
|
}
|
|
131
134
|
// Indented lines are part of hierarchy (at least 5 spaces for Mocha)
|
|
132
|
-
if (
|
|
135
|
+
if (/^\s{5,}\S/.exec(nextLine)) {
|
|
133
136
|
const part = nextLine.trim().replace(/:$/, ''); // Remove trailing colon
|
|
134
137
|
testNameParts.push(part);
|
|
135
138
|
}
|
|
@@ -146,7 +149,7 @@ function extractFailures(output) {
|
|
|
146
149
|
while (j < lines.length && j < i + 40) {
|
|
147
150
|
const nextLine = lines[j];
|
|
148
151
|
// Stop if we hit the next failure
|
|
149
|
-
if (
|
|
152
|
+
if (/^\s+\d+\)\s+/.exec(nextLine)) {
|
|
150
153
|
break;
|
|
151
154
|
}
|
|
152
155
|
// Extract error type and message
|
|
@@ -155,7 +158,7 @@ function extractFailures(output) {
|
|
|
155
158
|
// Pattern 3: " TypeError: Cannot read..."
|
|
156
159
|
if (!message) {
|
|
157
160
|
// Match plain "Error" or prefixed errors like "TypeError", "AssertionError"
|
|
158
|
-
const errorMatch =
|
|
161
|
+
const errorMatch = /^\s+([A-Za-z]*Error)(?:\s\[\w+\])?\s*:\s*(.+)/.exec(nextLine);
|
|
159
162
|
if (errorMatch) {
|
|
160
163
|
errorType = errorMatch[1];
|
|
161
164
|
message = errorMatch[2].trim();
|
|
@@ -167,15 +170,16 @@ function extractFailures(output) {
|
|
|
167
170
|
// - file:///path/to/file.js:10:20
|
|
168
171
|
// - /absolute/path/file.js:10:20
|
|
169
172
|
// - relative/path/file.js:10:20
|
|
170
|
-
const locationMatch =
|
|
173
|
+
const locationMatch = /at Context\.<anonymous> \((?:file:\/\/)?([^:)]+):(\d+)(?::(\d+))?\)/.exec(nextLine);
|
|
171
174
|
if (locationMatch) {
|
|
172
175
|
file = locationMatch[1];
|
|
173
|
-
lineNumber = parseInt(locationMatch[2], 10);
|
|
176
|
+
lineNumber = Number.parseInt(locationMatch[2], 10);
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
179
|
// Extract file from timeout error messages: "Error: Timeout... (/path/to/file.js)"
|
|
177
|
-
if (!file && message
|
|
178
|
-
|
|
180
|
+
if (!file && message?.includes('Timeout')) {
|
|
181
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses Mocha test framework timeout messages (controlled output), not user input
|
|
182
|
+
const timeoutFileMatch = /\(([^)]+\.(?:js|ts|mjs|cjs))\)/.exec(message);
|
|
179
183
|
if (timeoutFileMatch) {
|
|
180
184
|
file = timeoutFileMatch[1];
|
|
181
185
|
}
|
|
@@ -200,11 +204,12 @@ function extractFailures(output) {
|
|
|
200
204
|
/**
|
|
201
205
|
* Generate guidance based on failure types
|
|
202
206
|
*/
|
|
207
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- Complexity 16 acceptable for guidance generation (categorizes multiple error types and generates actionable suggestions)
|
|
203
208
|
function generateGuidance(failures) {
|
|
204
209
|
const guidances = [];
|
|
205
210
|
const seen = new Set();
|
|
206
211
|
for (const failure of failures) {
|
|
207
|
-
const message = failure.message
|
|
212
|
+
const message = failure.message ?? '';
|
|
208
213
|
const errorType = failure.errorType;
|
|
209
214
|
// Assertion errors
|
|
210
215
|
if (errorType === 'AssertionError' || message.includes('expected') || message.includes('Expected')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocha-extractor.js","sourceRoot":"","sources":["../src/mocha-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,gEAAgE;IAEhE,wCAAwC;IACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/D,OAAO;YACL,OAAO,EAAE,+CAA+C;YACxD,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,MAAM,CAAC,IAAI,EAAE;YAC1B,QAAQ,EAAE,6CAA6C;YACvD,QAAQ,EAAE;gBACR,UAAU,EAAE,CAAC;gBACb,YAAY,EAAE,CAAC;gBACf,MAAM,EAAE,CAAC,yBAAyB,CAAC;aACpC;SACF,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"mocha-extractor.js","sourceRoot":"","sources":["../src/mocha-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,gEAAgE;IAEhE,wCAAwC;IACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/D,OAAO;YACL,OAAO,EAAE,+CAA+C;YACxD,MAAM,EAAE,EAAE;YACV,UAAU,EAAE,CAAC;YACb,WAA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AAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,MAAwB;IACjD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,MAAM;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QACzE,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,OAAO,GAAG,QAAQ,KAAK,KAAK,CAAC,OAAO,GAAG,UAAU,EAAE,CAAC;IACtD,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playwright-extractor.d.ts","sourceRoot":"","sources":["../src/playwright-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAkB,oBAAoB,EAAsB,MAAM,YAAY,CAAC;AAG3F;;GAEG;
|
|
1
|
+
{"version":3,"file":"playwright-extractor.d.ts","sourceRoot":"","sources":["../src/playwright-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAkB,oBAAoB,EAAsB,MAAM,YAAY,CAAC;AAG3F;;GAEG;AAEH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CA+H5E;AAyGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAY1D"}
|