Open sean256 opened 3 years ago
@sean256 I second that!
After a second look, I noticed that the history
object is returning a native axios
object that does not have a fullUrl
equivalent parameter.
Solution
Instead of basing my tests on the generated output of a custom paramsSerializer
, I added assertions
for the params
passed in object form to the request.
In addition, I extracted the value of the paramsSerializer
function and separately added a full series of tests at the unit-level.
I've run into a case where I needed to customize axio's
paramsSerializer
to change the default handling of array serialization.It would be super if we could test for proper param serialization with this mock adapter.
My suggestion would be to add a new
fullUrl
to the history entries which includes the serialized parameters.