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

Currency unit $ is not reporting correctly in @As description #1253

Closed
manoj-fd opened this issue Apr 10, 2023 · 3 comments · Fixed by #1278
Closed

Currency unit $ is not reporting correctly in @As description #1253

manoj-fd opened this issue Apr 10, 2023 · 3 comments · Fixed by #1278

Comments

@manoj-fd
Copy link

manoj-fd commented Apr 10, 2023

Issue: As part of my test case, I am expected to use currency unit $ in my test description, however it's not working as expected.

Example -

@as("I have $$ 10") is returned as $ I have 10,

but the expectation is to return as I have $ 10 as per jGiven documentation https://jgiven.org/userguide/#_parameters_within_a_sentence

image

@l-1squared
Copy link
Collaborator

Hi Manoj,

thanks for reporting. I will have a look into the matter as soon as possible.

@l-1squared
Copy link
Collaborator

l-1squared commented Apr 13, 2023

I reproduced the issue. However I will still require some time to fix it. Among other things, I found out that we indeed have to methods to format descriptions (one for @As and one for @CaseAs) both of which have issues.

@l-1squared
Copy link
Collaborator

I found a solution to the issue. As of now, $$ is treated as a single $ character and will be considered part of a word.

I am, however, not yet content with the implementation of the parser (first off, we have two), so I will need more time to iron this out.

@l-1squared l-1squared linked a pull request May 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants