-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Custom jsonPath to work with newer versions of coverage #29
Conversation
The dist folder needs to be re-generated for this PR to be complete. Is this something anyone can help with? |
@@ -85,7 +85,7 @@ it('test badge case - custom label', async () => { | |||
expect(str.indexOf(`<text x="50" y="138" textLength="715">${customLabel}</text>`) > 0).toBeTruthy(); | |||
}); | |||
|
|||
it('test badge case - custom icon', async () => { | |||
it.skip('test badge case - custom icon', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this is failing, can anyone help debug this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reubenjohn I fixed it. thanks
I combined my research. It's not good to test |
…29) * Support for custom json paths to coverage % * Update README.md * Passthrough jsonPath argument * Temporary unique action name * Register jsonPath action input * Fix compilation * Fixed compilation * Updated jsonPath default value * Better error handling * Critical jsonPath bug fix * Updated test cases * Skip test 1a2deef
@reubenjohn I merged it, and now it looks fine. Can you provide some documentation examples for the newly provided 'jsonPath' parameter? @reubenjohn thx! |
@@ -1,4 +1,4 @@ | |||
name: 'Create Coverage Badges' | |||
name: 'Create Custom Coverage Badges' | |||
author: 'Kenny Wong' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaywcjlove thanks for the prompt response! I'd be happy to add some documentation this weekend. |
@reubenjohn thank you. |
When using the newer versions of coverage (eg. 7.3.2,), the JSON format has changed.
Eg:
Which results in the following error:
The proposed solution is to introduce a new argument called jsonPath which allows you to specify the path to the percentage field in the JSON file you would like to use in the badge.