agourlay/cornichon

Assert without placeholder resolution

Closed this issue · 2 comments

Example:

Then assert body.path("errors[0].message").is(
  """Using different values is not valid for field 'color'. Given values are '<undefined>, "red"'. """)

It would be nice to be able to have <undefined> not being resolved as a placeholder but used literally.

This could probably be done with either another implementation of is called e.g. isRaw or maybe more flexible by introducing a way to mark <undefined> in some way, e.g. <<undefined>> which would tell is to not evaluate the occurrence and replace it by <undefined>.

Thank you for the report, what you describe sounds reasonnable.

I'll give it a try for the next release 👍

Closing due to inactivity.

No work is planned in the foreseeable future to support this feature.