cypressautomocker icon indicating copy to clipboard operation
cypressautomocker copied to clipboard

MOCKING ON, but letting this fall through

Open Christilut opened this issue 6 years ago • 2 comments

Mocking seems to work for most of my calls but some are saying MOCKING ON, but letting this fall through. Why is that? Seems to happen to calls that it does a lot of to the same endpoint but different querystring. The endpoints are recorded and saved as json.

Christilut avatar Mar 03 '19 18:03 Christilut

Yeah, this library assumes that every run will call the exact same APIs with the same query strings. If that's not the case (for example, you're passing the current timestamp as a query parameter), it won't work.

I haven't worked on this in a little while, but when I get time I may introduce an option to provide a matching function.

scottschafer avatar Mar 07 '19 16:03 scottschafer

Ah okay, I was under the assumption that endpoints would be unique including their query string.

Actually it's not really a problem if it would just return the same response regardless of query string but it seems to not mock those calls.

Christilut avatar Mar 07 '19 16:03 Christilut