Skip to content

Commit

Permalink
JSON.stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Dec 23, 2024
1 parent ebba2b2 commit b14d569
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 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.

9 changes: 6 additions & 3 deletions src/scripts/testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ export const testing = async (
}

if (response.error && failedToReadFile == false) {
outputStr += parseXmlToJson(testResults);
console.log(outputStr.toString());
outputStr += JSON.stringify(parseXmlToJson(testResults));
console.log(outputStr);
try {
fs.writeFileSync("src/test/json-results.json", outputStr);
fs.writeFileSync(
"src/test/json-results.json",
JSON.stringify(parseXmlToJson(testResults)),
);
} catch (error) {
setFailed(`Failed to write output to file: ${error as string}`);
}
Expand Down

0 comments on commit b14d569

Please sign in to comment.