Skip to content

Commit

Permalink
Update testng.js (#55)
Browse files Browse the repository at this point in the history
* Update testng.js

* Update package.json
  • Loading branch information
ASaiAnudeep authored Feb 29, 2024
1 parent a1ba45e commit 013d6b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-results-parser",
"version": "0.1.7",
"version": "0.1.8",
"description": "Parse test results from JUnit, TestNG, xUnit, cucumber and many more",
"main": "src/index.js",
"types": "./src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/parsers/testng.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ function getTestSuite(rawSuite) {
const rawTest = rawTests[i];
const rawClasses = rawTest.class;
for (let j = 0; j < rawClasses.length; j++) {
let testMethods = rawClasses[i]['test-method'].filter(raw => !raw['@_is-config']);
let testMethods = rawClasses[j]['test-method'].filter(raw => !raw['@_is-config']);
testMethods.forEach(testMethod => {
testMethod["@_class"] = rawClasses[i]["@_name"]; // push className onto test-method
testMethod["@_class"] = rawClasses[j]["@_name"]; // push className onto test-method
});
rawTestMethods.push(...testMethods);
}
Expand Down

0 comments on commit 013d6b7

Please sign in to comment.