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

ENHANCEMENT: add configuration option for passing arbitrary data #148

Open
LukasMac opened this issue May 10, 2022 · 1 comment
Open

ENHANCEMENT: add configuration option for passing arbitrary data #148

LukasMac opened this issue May 10, 2022 · 1 comment

Comments

@LukasMac
Copy link

LukasMac commented May 10, 2022

Hey!

I would like to propose to have a configuration option for passing any arbirary data? Something like JEST_HTML_REPORTER_EXTRA_DATA

My specific case for this option: during CI/CD pipeline there is some data that I would like to display in the report. Currently as a workaround I set the JSON string value to JEST_HTML_REPORTER_PAGE_TITLE and then using CSS hide the title. From there I can parse JSON string using JavaScript and use it for displaying extra data.

I would be happy to contribute and implement it if that sounds reasonable to have? Thanks!

@Hargne
Copy link
Owner

Hargne commented May 16, 2022

Hi,

Great idea.
I think this could be doable indeed, perhaps if you were to integrate it with the boilerplate option.

Right now the user can provide their own HTML boilerplate where using {jesthtmlreporter-content} will be replaced with the test results.

I would probably go for a key-value (i.e boilerplateData) approach where you could enter 0..n entries where the key (inside brackets) would eventually be replaced with the provided value within the boilerplate. This way we would keep it dynamic for people interested in adding multiple entries.

Feel free to take this on if you feel for it! 👍

ptabor pushed a commit to ptabor/jest-html-reporter that referenced this issue Sep 1, 2023
Bumps [tar](https://github.com/npm/node-tar) from 4.4.10 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.10...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants