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

Generate HTML report? #13

Closed
esamattis opened this issue Sep 27, 2017 · 10 comments
Closed

Generate HTML report? #13

esamattis opened this issue Sep 27, 2017 · 10 comments

Comments

@esamattis
Copy link

esamattis commented Sep 27, 2017

Any plans for this?

I explored if it would have been possible to do via custom jest reporter but it seems that it's not possible to pass custom metadata (name of the diff file) from the toMatchImageSnapshot matcher to the reporters :/

@anescobar1991
Copy link
Member

anescobar1991 commented Sep 27, 2017

Yes! We did get a solution for this that we are using internally and will be open sourcing that HTML reporter shortly (new week or so).

It was a bummer to me that passing custom metadata is not currently supported by jest but that's something that needs to be take up with jest maintainers and I found an ugly workaround for the time being.

@esamattis
Copy link
Author

Awesome! Can't wait :)

I was already thinking of doing a global map of test names with the match results in the matcher and reading it in a reporter.

I opened an issue on Jest jestjs/jest#4547

@anescobar1991
Copy link
Member

Thank you! I will keep this open until I publish the reporter.

anescobar1991 added a commit that referenced this issue Dec 7, 2017
…ix to master

* commit '98e8b991d5afba865b6ff4dc79ff8134dec9f04f':
  docs(readme): remove default value for customSnapshotsDir
@Prior99
Copy link

Prior99 commented Feb 14, 2018

Hi, I find the idea of an HTML report very interesting. Maybe with tools similar to the ones in bitbucket? Any updates on this?

@anescobar1991
Copy link
Member

anescobar1991 commented Feb 14, 2018

@Prior99 @epeli let me give an update on this since it has been awhile:

I know I previously said I would open source a simple html reporter but I decided not too until jestjs/jest#4547 is resolved.

What we have internally is an ugly hack I don't wish to open source (think https://github.com/Hargne/jest-html-reporter but with a regex to check for a path to a png image in the failure message so we can embed that image into html).

If jestjs/jest#4547 can be resolved I can easily create an HTML reporter that could even integrate some cool diffing like what Bitbucket has if wanted. But I have not found the time to work on that jest issue. If you guys have the time and can help out with that it would be great! Otherwise it may be awhile.

@Prior99
Copy link

Prior99 commented Feb 14, 2018

I think we are thinking about different HTML reporters here. I will have a look at the issue and maybe send a pull request if I can find some time on a weekend.

@anescobar1991
Copy link
Member

@Prior99 what are you thinking of then? Do you think it should be its own feature request in another issue?

@Prior99
Copy link

Prior99 commented Feb 15, 2018 via email

@anescobar1991
Copy link
Member

@Prior99 opened up #51 for your idea.

@anescobar1991
Copy link
Member

anescobar1991 commented Mar 5, 2018

Closing this as I am not sure this is going to be worked on anytime soon and is really not a jest-image-snapshot issue. Can reopen if jestjs/jest#4547 makes it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants