You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if scenario passes arguments to a step but step definition doesn't declare any arguments there are no warning about that.
I think to avoid possible bugs it should be handled similar when you pass argument to a function that does not define any arguments: fail with error in compile time. Or at least produce a warning.
Not sure if bug or possible enchantment thought.
The text was updated successfully, but these errors were encountered:
ya-netgrp
changed the title
Missing warnings when passing argumens but step does not specify them
Missing warnings when scenario passing argumens but step does not specify them
Aug 15, 2023
Hmm, I see. The problem is that the macros generating the functions for the steps and the macros generating the step-calling functions make some assumptions to have a more forgiving syntax. One of the assumptions is that they will always pass an argument list, even if it's empty. There may be some way to add more function clauses that would cause the keyword lists to only be passed through if defined in the scenario step. I'll have to think about it, thanks for the feedback at any rate!
Currently if scenario passes arguments to a step but step definition doesn't declare any arguments there are no warning about that.
I think to avoid possible bugs it should be handled similar when you pass argument to a function that does not define any arguments: fail with error in compile time. Or at least produce a warning.
Not sure if bug or possible enchantment thought.
The text was updated successfully, but these errors were encountered: