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 assert 'failedTemplate' to catch a substring and regex in error message #221

Open
ivankatliarchuk opened this issue Sep 20, 2023 · 3 comments
Labels

Comments

@ivankatliarchuk
Copy link
Contributor

It would help if we can support assert 'failedTemplate' to catch a regex or a substrict, without requiring to specify a full message.

Something like:

tests:
  - it: 
    template:
    asserts:
      - failedTemplate:
          contains: "a text"
      - failedTemplate:
          matchRegexPattern: "^namespace:"

The format could be any, as long as functionality is supported.

@quintush
Copy link
Contributor

Hello @ivankatliarchuk,

Thanks for the suggestion.
Will look into it and will try to combine it with #218.

The last change on the failedTemplate assertion, did not achieve the goal I wanted to reach. 😟

Greetings,
@quintush

@alexandreribeiro
Copy link

+1 to this feature :)

@falcasantos
Copy link

+1 to this as well!

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

No branches or pull requests

4 participants