Skip to content

Commit

Permalink
fix: 🐛 fixed issue while parsing results (#97)
Browse files Browse the repository at this point in the history
* fix: 🐛 fixed issue while parsing results

* fix: 🐛 fixed failing lint and build commands
  • Loading branch information
WasiqB authored Nov 26, 2024
1 parent 2b7c302 commit 8c8e20e
Show file tree
Hide file tree
Showing 5 changed files with 492 additions and 706 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@ultra-reporter/analytics": "workspace:*",
"@ultra-reporter/ui": "workspace:*",
"@ultra-reporter/utils": "workspace:*",
"lucide-react": "^0.460.0",
"lucide-react": "^0.461.0",
"next": "15.0.3"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
"@release-it-plugins/lerna-changelog": "^7.0.0",
"@stylistic/eslint-plugin-js": "^2.11.0",
"@stylistic/eslint-plugin-ts": "^2.11.0",
"@types/node": "^22.9.3",
"@types/node": "^22.10.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@vercel/style-guide": "^6.0.0",
"eslint": "^9.15.0",
"eslint-config-next": "15.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "2.3.1",
"eslint-config-turbo": "2.3.2",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"husky": "^9.1.7",
"lerna-changelog": "^2.2.0",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"prettier-plugin-organize-imports": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.6.9",
"release-it": "^17.10.0",
"release-it-pnpm": "^4.6.3",
"turbo": "^2.3.1",
"turbo": "^2.3.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.4",
"@tanstack/react-table": "^8.20.5",
"class-variance-authority": "^0.7.0",
"class-variance-authority": "^0.7.1",
"cmdk": "1.0.4",
"embla-carousel-react": "^8.5.1",
"lucide-react": "^0.460.0",
"lucide-react": "^0.461.0",
"next": "15.0.3",
"next-themes": "^0.4.3",
"react-code-blocks": "^0.1.6",
Expand All @@ -61,10 +61,10 @@
"@types/react-dom": "^18",
"@ultra-reporter/typescript-config": "workspace:*",
"@ultra-reporter/utils": "workspace:*",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.14",
"postcss": "^8.4.49",
"postcss-load-config": "^6.0.1",
"autoprefixer": "^10.4.20",
"tailwindcss": "^3.4.15"
}
}
7 changes: 5 additions & 2 deletions packages/utils/src/parsers/xml-parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { parseString } from 'xml2js';
import { isProd } from '../types/constants';
import {
TestCase,
TestClass,
Expand Down Expand Up @@ -59,7 +60,7 @@ const getParams = (params: any): string[] => {
if (!params) return result;

const processParam = (param: any): void => {
result.push(param.value.trim());
result.push(param?.value.toString().trim());
};

const param = params.param;
Expand Down Expand Up @@ -187,8 +188,10 @@ const getTestResults = (jsonData: any): TestResult => {
test_suites: getTestSuites(testResult.suite),
};
return mapToResult;
/* eslint-disable @typescript-eslint/no-unused-vars */
} catch (error) {
if (!isProd) {
console.log(error);
}
throw new Error(`Error while processing the XML file, ${errorMessage}`);
}
};
Expand Down
Loading

0 comments on commit 8c8e20e

Please sign in to comment.