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

Support multiple asserts of same type #76

Open
evilrobot-01 opened this issue Nov 3, 2022 · 0 comments
Open

Support multiple asserts of same type #76

evilrobot-01 opened this issue Nov 3, 2022 · 0 comments

Comments

@evilrobot-01
Copy link
Contributor

Currently one cannot have multiple asserts of the same type, as keys need to be unique. As an example:

              - asserts:
                  equal:
                    args: [ true, true ]
                  equal:
                    args: [ true, true ]

This results in YAMLSemanticError: Map keys must be unique; "equal" is repeated.

Switching to using dashed notation works around this:

              - asserts:
                  - equal:
                      args: [ true, true ]
                  - equal:
                      args: [ true, true ]

But this then results in an issue when resolving the asserts, where the key name is its index (0,1 etc.) rather than the assert name (equal):

image

A workaround is to separate them into additional assert sections, but having a single assert section would be ideal:

              - asserts:
                  equal:
                    args: [ true, true ]
              - asserts:
                  equal:
                    args: [ true, true ]
@evilrobot-01 evilrobot-01 linked a pull request Nov 7, 2022 that will close this issue
This was linked to pull requests Nov 11, 2022
@evilrobot-01 evilrobot-01 linked a pull request Nov 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant