Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add mocha report parser #10

Merged
merged 6 commits into from
Jun 11, 2022
Merged

Conversation

leelaprasadv
Copy link
Contributor

closes #6

Change Summary:

  • Added Mocha JSON report parser.
    • Capable of parsing both default mocha JSON report and mochawesome.json report.
    • Adding formatting logic to format json report generated by default mocha JSON reporter to required format.
    • Easily digests mochawesome.json report.
  • Added Tests for newly added mocha parser.
  • Readme update

@@ -8,6 +8,13 @@ function getJsonFromXMLFile(filePath) {
return parser.parse(xml, { arrayMode: true, ignoreAttributes: false, parseAttributeValue: true });
}

function getJsonFromFile(filePath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can directly read a json file using require statement. Anyway we can keep it for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR to require the json instead of fs.readSync

@leelaprasadv leelaprasadv merged commit 7ea2543 into main Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Mocha JSON reporter file
2 participants