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
first of all thanks for the package, it's more like a standard for me to install when using controller level tests etc. Thanks!
There's one thing that I mostly run into and had different strategies to get around: dynamic values
Let's assume if test the json response of a POST endpoint for creating a resource and unfortunately I'm unable to use uuid generated on client side but auto increment (i know 🙈)
And id and createdAt change every time. Yes, there are different strategies possible (e.g. mocking on api side, custom driver, stripping those parts ...), but I wanted to propose a built-in solution to support this out of the box:
Hi there,
first of all thanks for the package, it's more like a standard for me to install when using controller level tests etc. Thanks!
There's one thing that I mostly run into and had different strategies to get around: dynamic values
Let's assume if test the json response of a POST endpoint for creating a resource and unfortunately I'm unable to use
uuid
generated on client side but auto increment (i know 🙈)POST /api/book
Response:
And
id
andcreatedAt
change every time. Yes, there are different strategies possible (e.g. mocking on api side, custom driver, stripping those parts ...), but I wanted to propose a built-in solution to support this out of the box:With the key being a json path and the key a regex.
Honestly, not so sure if that's easy, but wanted to get your opinion and check if i'm missing an obvious solution here.
WDYT?
PS: OC I'd be up to work on the solution if you consider this feature valuable.
The text was updated successfully, but these errors were encountered: