Skip to content

Commit

Permalink
Add functionality to write test results to JSON file
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Dec 23, 2024
1 parent 25c40da commit ebba2b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/scripts/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export const testing = async (
if (response.error && failedToReadFile == false) {
outputStr += parseXmlToJson(testResults);
console.log(outputStr.toString());
try {
fs.writeFileSync("src/test/json-results.json", outputStr);
} catch (error) {
setFailed(`Failed to write output to file: ${error as string}`);
}
// outputStr +=
// "<table><tr><th>File</th><th>Test Name</th><th>Line</th><th>Message</th></tr>";

Expand Down

0 comments on commit ebba2b2

Please sign in to comment.