Skip to content

How to add a custom helper ? #393

Answered by DannyDainton
iamvarshith asked this question in Q&A
Discussion options

You must be logged in to vote

That's unfortunately not the way helpers are added to the report. They are placed inside the actual reporter code.

https://github.com/DannyDainton/newman-reporter-htmlextra/blob/main/lib/index.js#L68

The report is compiled just before the end of the Collection run where it fills in all the handlebar placeholders, it's trying to di that for your helper. As you can see in the error.

The template script you added would likely be throwing console errors, if you removed the placeholder and let the report be created. It wouldn't know what Handlebars is in that context.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@iamvarshith
Comment options

@DannyDainton
Comment options

@DannyDainton
Comment options

@iamvarshith
Comment options

@iamvarshith
Comment options

Answer selected by iamvarshith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants