Skip to content

Commit

Permalink
merge(#41): fix: logging after the variable is created
Browse files Browse the repository at this point in the history
fix: logging after the variable is created
  • Loading branch information
403-html authored Jan 13, 2024
2 parents fba8c90 + fcb07f2 commit 9a08b7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ const convertMochaToMarkdown = () => {
logger.info('Rendering template with test results');
const renderedMarkdown = mustache.render(templateContent, {...extractedInfo, title});

logger.info(`Creating directory structure: ${outputPath}`);
const outputPath = pathPkg.dirname(output);
logger.info(`Creating directory structure: ${outputPath}`);
fs.mkdirSync(outputPath, { recursive: true });

logger.info(`Writing markdown to: ${output}`);
fs.writeFileSync(output, renderedMarkdown);
};

convertMochaToMarkdown();
convertMochaToMarkdown();
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mochawesome-json-to-md",
"version": "1.2.0",
"version": "1.2.1",
"description": "A repository containing a script to convert JSON reports generated by MochAwesome to Mardown",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit 9a08b7b

Please sign in to comment.